llvm-project/clang/lib
Arthur Eubanks 9181ce623f [Windows] Put init_seg(compiler/lib) in llvm.global_ctors
Currently we treat initializers with init_seg(compiler/lib) as similar
to any other init_seg, they simply have a global variable in the proper
section (".CRT$XCC" for compiler/".CRT$XCL" for lib) and are added to
llvm.used. However, this doesn't match with how LLVM sees normal (or
init_seg(user)) initializers via llvm.global_ctors. This
causes issues like incorrect init_seg(compiler) vs init_seg(user)
ordering due to GlobalOpt evaluating constructors, and the
ability to remove init_seg(compiler/lib) initializers at all.

Currently we use 'A' for priorities less than 200. Use 200 for
init_seg(compiler) (".CRT$XCC") and 400 for init_seg(lib) (".CRT$XCL"),
which do not append the priority to the section name. Priorities
between 200 and 400 use ".CRT$XCC${Priority}". This allows for
some wiggle room for people/future extensions that want to add
initializers between compiler and lib.

Fixes #56922

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D131910
2022-08-16 08:16:18 -07:00
..
APINotes
ARCMigrate [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
AST Use llvm::all_of (NFC) 2022-08-14 16:25:36 -07:00
ASTMatchers Revert "ManagedStatic: remove from ASTMatchersInternal.h" 2022-07-27 15:46:21 +02:00
Analysis [CFG] Fix crash on CFG building when deriving from a template. 2022-08-16 13:01:13 +02:00
Basic [clang] fix frontend crash when evaluating type trait 2022-08-13 00:02:19 +08:00
CodeGen [Windows] Put init_seg(compiler/lib) in llvm.global_ctors 2022-08-16 08:16:18 -07:00
CrossTU Fixed a number of typos 2022-08-01 13:13:18 -04:00
DirectoryWatcher [clang] fix deprecation 2022-08-09 17:42:55 +02:00
Driver [clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++" 2022-08-16 09:27:18 -04:00
Edit [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
ExtractAPI [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
Format [clang-format] Fix aligning of java-style declarations 2022-08-15 20:27:15 -07:00
Frontend Use llvm::none_of (NFC) 2022-08-14 16:25:39 -07:00
FrontendTool [C++20][Modules][HU 1/5] Introduce header units as a module type. 2022-03-25 09:17:14 +00:00
Headers [X86] Add RDPRU instruction CPUID bit masks 2022-08-11 16:07:36 +01:00
Index Use llvm::erase_if (NFC) 2022-08-13 12:55:48 -07:00
IndexSerialization
Interpreter [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
Lex Revert "[clang] adds unary type transformations as compiler built-ins" 2022-08-14 15:58:21 -04:00
Parse Revert "[clang] adds unary type transformations as compiler built-ins" 2022-08-14 15:58:21 -04:00
Rewrite [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
Sema MSVC compatibility mode: fix error on unqualified templated base class initialization in case of partial specialization 2022-08-16 17:09:55 +02:00
Serialization [clang] Require strict matches for defines for PCH in GCC style directories 2022-08-10 22:47:27 +03:00
StaticAnalyzer [analyzer] Fix a crash on copy elided initialized lambda captures 2022-08-13 00:22:01 +02:00
Support [RISCV][Clang] Support policy function for all vector segment load. 2022-08-04 17:47:24 +00:00
Testing [include-cleaner] Include-cleaner library structure, and simplistic AST walking. 2022-04-29 11:04:11 +02:00
Tooling [clang][transformer] Finish plumbing `Note` all the way to the output. 2022-08-11 07:54:44 +02:00
CMakeLists.txt [RISCV] Moving RVV intrinsic type related util to clang/Support 2022-04-20 21:13:13 +08:00