Skip to content
Snippets Groups Projects
Commit c940d9a1 authored by Eric Müller's avatar Eric Müller :mountain_bicyclist:
Browse files

Integrate upstream llvm package (from a8d440d3)

parent 272da1a7
No related branches found
No related tags found
No related merge requests found
--- a/llvm/utils/benchmark/src/benchmark_register.h
+++ b/llvm/utils/benchmark/src/benchmark_register.h
@@ -2,6 +2,7 @@
#define BENCHMARK_REGISTER_H
#include <vector>
+#include <limits>
#include "check.h"
diff --git a/llvm/include/llvm/Config/llvm-config.h.cmake b/llvm/include/llvm/Config/llvm-config.h.cmake
index 4493bb65d444..e2b3c61b3c33 100644
--- a/llvm/include/llvm/Config/llvm-config.h.cmake
+++ b/llvm/include/llvm/Config/llvm-config.h.cmake
@@ -74,6 +74,9 @@
/* Patch version of the LLVM API */
#define LLVM_VERSION_PATCH ${LLVM_VERSION_PATCH}
+/* LLVM version suffix */
+#cmakedefine LLVM_VERSION_SUFFIX "${LLVM_VERSION_SUFFIX}"
+
/* LLVM version string */
#define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
--- a/lldb/include/lldb/Utility/TaskPool.h
+++ b/lldb/include/lldb/Utility/TaskPool.h
@@ -33,6 +33,7 @@
#include <queue>
#include <thread>
#include <vector>
+#include <functional>
// Global TaskPool class for running tasks in parallel on a set of worker thread
// created the first
# Fix lld templates: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230463
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -158,7 +158,7 @@
return Ret;
}
-template void BitcodeCompiler::template add<ELF32LE>(BitcodeFile &);
-template void BitcodeCompiler::template add<ELF32BE>(BitcodeFile &);
-template void BitcodeCompiler::template add<ELF64LE>(BitcodeFile &);
-template void BitcodeCompiler::template add<ELF64BE>(BitcodeFile &);
+template void BitcodeCompiler::add<ELF32LE>(BitcodeFile &);
+template void BitcodeCompiler::add<ELF32BE>(BitcodeFile &);
+template void BitcodeCompiler::add<ELF64LE>(BitcodeFile &);
+template void BitcodeCompiler::add<ELF64BE>(BitcodeFile &);
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -343,45 +343,45 @@
template bool SymbolBody::hasThunk<ELF64LE>() const;
template bool SymbolBody::hasThunk<ELF64BE>() const;
-template uint32_t SymbolBody::template getVA<ELF32LE>(uint32_t) const;
-template uint32_t SymbolBody::template getVA<ELF32BE>(uint32_t) const;
-template uint64_t SymbolBody::template getVA<ELF64LE>(uint64_t) const;
-template uint64_t SymbolBody::template getVA<ELF64BE>(uint64_t) const;
-
-template uint32_t SymbolBody::template getGotVA<ELF32LE>() const;
-template uint32_t SymbolBody::template getGotVA<ELF32BE>() const;
-template uint64_t SymbolBody::template getGotVA<ELF64LE>() const;
-template uint64_t SymbolBody::template getGotVA<ELF64BE>() const;
-
-template uint32_t SymbolBody::template getGotOffset<ELF32LE>() const;
-template uint32_t SymbolBody::template getGotOffset<ELF32BE>() const;
-template uint64_t SymbolBody::template getGotOffset<ELF64LE>() const;
-template uint64_t SymbolBody::template getGotOffset<ELF64BE>() const;
-
-template uint32_t SymbolBody::template getGotPltVA<ELF32LE>() const;
-template uint32_t SymbolBody::template getGotPltVA<ELF32BE>() const;
-template uint64_t SymbolBody::template getGotPltVA<ELF64LE>() const;
-template uint64_t SymbolBody::template getGotPltVA<ELF64BE>() const;
-
-template uint32_t SymbolBody::template getThunkVA<ELF32LE>() const;
-template uint32_t SymbolBody::template getThunkVA<ELF32BE>() const;
-template uint64_t SymbolBody::template getThunkVA<ELF64LE>() const;
-template uint64_t SymbolBody::template getThunkVA<ELF64BE>() const;
-
-template uint32_t SymbolBody::template getGotPltOffset<ELF32LE>() const;
-template uint32_t SymbolBody::template getGotPltOffset<ELF32BE>() const;
-template uint64_t SymbolBody::template getGotPltOffset<ELF64LE>() const;
-template uint64_t SymbolBody::template getGotPltOffset<ELF64BE>() const;
-
-template uint32_t SymbolBody::template getPltVA<ELF32LE>() const;
-template uint32_t SymbolBody::template getPltVA<ELF32BE>() const;
-template uint64_t SymbolBody::template getPltVA<ELF64LE>() const;
-template uint64_t SymbolBody::template getPltVA<ELF64BE>() const;
-
-template uint32_t SymbolBody::template getSize<ELF32LE>() const;
-template uint32_t SymbolBody::template getSize<ELF32BE>() const;
-template uint64_t SymbolBody::template getSize<ELF64LE>() const;
-template uint64_t SymbolBody::template getSize<ELF64BE>() const;
+template uint32_t SymbolBody::getVA<ELF32LE>(uint32_t) const;
+template uint32_t SymbolBody::getVA<ELF32BE>(uint32_t) const;
+template uint64_t SymbolBody::getVA<ELF64LE>(uint64_t) const;
+template uint64_t SymbolBody::getVA<ELF64BE>(uint64_t) const;
+
+template uint32_t SymbolBody::getGotVA<ELF32LE>() const;
+template uint32_t SymbolBody::getGotVA<ELF32BE>() const;
+template uint64_t SymbolBody::getGotVA<ELF64LE>() const;
+template uint64_t SymbolBody::getGotVA<ELF64BE>() const;
+
+template uint32_t SymbolBody::getGotOffset<ELF32LE>() const;
+template uint32_t SymbolBody::getGotOffset<ELF32BE>() const;
+template uint64_t SymbolBody::getGotOffset<ELF64LE>() const;
+template uint64_t SymbolBody::getGotOffset<ELF64BE>() const;
+
+template uint32_t SymbolBody::getGotPltVA<ELF32LE>() const;
+template uint32_t SymbolBody::getGotPltVA<ELF32BE>() const;
+template uint64_t SymbolBody::getGotPltVA<ELF64LE>() const;
+template uint64_t SymbolBody::getGotPltVA<ELF64BE>() const;
+
+template uint32_t SymbolBody::getThunkVA<ELF32LE>() const;
+template uint32_t SymbolBody::getThunkVA<ELF32BE>() const;
+template uint64_t SymbolBody::getThunkVA<ELF64LE>() const;
+template uint64_t SymbolBody::getThunkVA<ELF64BE>() const;
+
+template uint32_t SymbolBody::getGotPltOffset<ELF32LE>() const;
+template uint32_t SymbolBody::getGotPltOffset<ELF32BE>() const;
+template uint64_t SymbolBody::getGotPltOffset<ELF64LE>() const;
+template uint64_t SymbolBody::getGotPltOffset<ELF64BE>() const;
+
+template uint32_t SymbolBody::getPltVA<ELF32LE>() const;
+template uint32_t SymbolBody::getPltVA<ELF32BE>() const;
+template uint64_t SymbolBody::getPltVA<ELF64LE>() const;
+template uint64_t SymbolBody::getPltVA<ELF64BE>() const;
+
+template uint32_t SymbolBody::getSize<ELF32LE>() const;
+template uint32_t SymbolBody::getSize<ELF32BE>() const;
+template uint64_t SymbolBody::getSize<ELF64LE>() const;
+template uint64_t SymbolBody::getSize<ELF64BE>() const;
template class elf::Undefined<ELF32LE>;
template class elf::Undefined<ELF32BE>;
# Fix lld templates: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230463
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -383,17 +383,17 @@
return B.getName();
}
-template uint32_t SymbolBody::template getSize<ELF32LE>() const;
-template uint32_t SymbolBody::template getSize<ELF32BE>() const;
-template uint64_t SymbolBody::template getSize<ELF64LE>() const;
-template uint64_t SymbolBody::template getSize<ELF64BE>() const;
+template uint32_t SymbolBody::getSize<ELF32LE>() const;
+template uint32_t SymbolBody::getSize<ELF32BE>() const;
+template uint64_t SymbolBody::getSize<ELF64LE>() const;
+template uint64_t SymbolBody::getSize<ELF64BE>() const;
-template bool DefinedRegular::template isMipsPIC<ELF32LE>() const;
-template bool DefinedRegular::template isMipsPIC<ELF32BE>() const;
-template bool DefinedRegular::template isMipsPIC<ELF64LE>() const;
-template bool DefinedRegular::template isMipsPIC<ELF64BE>() const;
+template bool DefinedRegular::isMipsPIC<ELF32LE>() const;
+template bool DefinedRegular::isMipsPIC<ELF32BE>() const;
+template bool DefinedRegular::isMipsPIC<ELF64LE>() const;
+template bool DefinedRegular::isMipsPIC<ELF64BE>() const;
-template uint32_t SharedSymbol::template getAlignment<ELF32LE>() const;
-template uint32_t SharedSymbol::template getAlignment<ELF32BE>() const;
-template uint32_t SharedSymbol::template getAlignment<ELF64LE>() const;
-template uint32_t SharedSymbol::template getAlignment<ELF64BE>() const;
+template uint32_t SharedSymbol::getAlignment<ELF32LE>() const;
+template uint32_t SharedSymbol::getAlignment<ELF32BE>() const;
+template uint32_t SharedSymbol::getAlignment<ELF64LE>() const;
+template uint32_t SharedSymbol::getAlignment<ELF64BE>() const;
# <sys/ustat.h> has been removed from glibc 2.28,
# backport fix from llvm-6.0.1:
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -159,1 +159,0 @@
-#include <sys/ustat.h>
@@ -252,5 +252,17 @@
#if SANITIZER_LINUX && !SANITIZER_ANDROID
- unsigned struct_ustat_sz = sizeof(struct ustat);
+ // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
+ // has been removed from glibc 2.28.
+#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
+ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
+ || defined(__x86_64__)
+#define SIZEOF_STRUCT_USTAT 32
+#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
+ || defined(__powerpc__) || defined(__s390__)
+#define SIZEOF_STRUCT_USTAT 20
+#else
+#error Unknown size of struct ustat
+#endif
+ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
# https://github.com/spack/spack/issues/24270 (This hunk is upstream since llvm-10)
--- a/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
+++ b/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
@@ -4,6 +4,8 @@
#include "llvm/Demangle/Compiler.h"
#include "llvm/Demangle/StringView.h"
#include <array>
+#include <cstdint>
+#include <string>
class OutputStream;
# https://github.com/spack/spack/pull/27233
--- a/llvm/utils/benchmark/src/benchmark_register.h
+++ b/llvm/utils/benchmark/src/benchmark_register.h
@@ -2,6 +2,7 @@
#define BENCHMARK_REGISTER_H
#include <vector>
+#include <limits>
#include "check.h"
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
@@ -370,15 +370,6 @@
#if SANITIZER_GLIBC
// _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
- _(CYGETDEFTHRESH, WRITE, sizeof(int));
- _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
- _(CYGETMON, WRITE, struct_cyclades_monitor_sz);
- _(CYGETTHRESH, WRITE, sizeof(int));
- _(CYGETTIMEOUT, WRITE, sizeof(int));
- _(CYSETDEFTHRESH, NONE, 0);
- _(CYSETDEFTIMEOUT, NONE, 0);
- _(CYSETTHRESH, NONE, 0);
- _(CYSETTIMEOUT, NONE, 0);
_(EQL_EMANCIPATE, WRITE, struct_ifreq_sz);
_(EQL_ENSLAVE, WRITE, struct_ifreq_sz);
_(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz);
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -983,7 +983,6 @@
#if SANITIZER_LINUX && !SANITIZER_ANDROID
extern unsigned struct_ax25_parms_struct_sz;
-extern unsigned struct_cyclades_monitor_sz;
extern unsigned struct_input_keymap_entry_sz;
extern unsigned struct_ipx_config_data_sz;
extern unsigned struct_kbdiacrs_sz;
@@ -1328,15 +1327,6 @@
#endif // SANITIZER_LINUX
#if SANITIZER_LINUX && !SANITIZER_ANDROID
-extern unsigned IOCTL_CYGETDEFTHRESH;
-extern unsigned IOCTL_CYGETDEFTIMEOUT;
-extern unsigned IOCTL_CYGETMON;
-extern unsigned IOCTL_CYGETTHRESH;
-extern unsigned IOCTL_CYGETTIMEOUT;
-extern unsigned IOCTL_CYSETDEFTHRESH;
-extern unsigned IOCTL_CYSETDEFTIMEOUT;
-extern unsigned IOCTL_CYSETTHRESH;
-extern unsigned IOCTL_CYSETTIMEOUT;
extern unsigned IOCTL_EQL_EMANCIPATE;
extern unsigned IOCTL_EQL_ENSLAVE;
extern unsigned IOCTL_EQL_GETMASTRCFG;
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
@@ -143,7 +143,6 @@
# include <sys/procfs.h>
#endif
#include <sys/user.h>
-#include <linux/cyclades.h>
#include <linux/if_eql.h>
#include <linux/if_plip.h>
#include <linux/lp.h>
@@ -460,7 +459,6 @@
#if SANITIZER_GLIBC
unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
#if EV_VERSION > (0x010000)
unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry);
#else
@@ -824,15 +822,6 @@
#endif // SANITIZER_LINUX
#if SANITIZER_LINUX && !SANITIZER_ANDROID
- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
- unsigned IOCTL_CYGETMON = CYGETMON;
- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH;
- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT;
- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH;
- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT;
- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH;
- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT;
unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE;
unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE;
unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG;
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
@@ -370,9 +370,0 @@
- _(CYGETDEFTHRESH, WRITE, sizeof(int));
- _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
- _(CYGETMON, WRITE, struct_cyclades_monitor_sz);
- _(CYGETTHRESH, WRITE, sizeof(int));
- _(CYGETTIMEOUT, WRITE, sizeof(int));
- _(CYSETDEFTHRESH, NONE, 0);
- _(CYSETDEFTIMEOUT, NONE, 0);
- _(CYSETTHRESH, NONE, 0);
- _(CYSETTIMEOUT, NONE, 0);
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -986,1 +986,0 @@
- extern unsigned struct_cyclades_monitor_sz;
@@ -1331,9 +1327,0 @@
- extern unsigned IOCTL_CYGETDEFTHRESH;
- extern unsigned IOCTL_CYGETDEFTIMEOUT;
- extern unsigned IOCTL_CYGETMON;
- extern unsigned IOCTL_CYGETTHRESH;
- extern unsigned IOCTL_CYGETTIMEOUT;
- extern unsigned IOCTL_CYSETDEFTHRESH;
- extern unsigned IOCTL_CYSETDEFTIMEOUT;
- extern unsigned IOCTL_CYSETTHRESH;
- extern unsigned IOCTL_CYSETTIMEOUT;
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -143,1 +143,0 @@
-#include <linux/cyclades.h>
@@ -460,1 +459,0 @@
- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
@@ -824,9 +822,0 @@
- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
- unsigned IOCTL_CYGETMON = CYGETMON;
- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH;
- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT;
- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH;
- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT;
- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH;
- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT;
This diff is collapsed.
# ipc_perm.mode is not used and has changed from short to int over architecures
# and versions. The last change was in glibc-2.31.
# LLVM upstream decided to not check ipc_perm.mode below glibc-2.31,
# because it is not actually used in the sanitizer:
# github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -1143,1 +1143,0 @@
-CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
# Fix missing std:size_t in 'llvm@4:5' for build with '%clang@7:'
--- a/compiler-rt/lib/xray/xray_buffer_queue.h
+++ b/compiler-rt/lib/xray/xray_buffer_queue.h
@@ -18,0 +18,1 @@
+#include <cstddef>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment