llvm-project/clang/lib
Richard Smith cd4d6d718b PR48030: Fix COMDAT-related linking problem with C++ thread_local static data members.
Previously when emitting a C++ guarded initializer, we tried to work out what
the enclosing function would be used for and added it to the COMDAT containing
the variable if we thought that doing so would be correct. But this was done
from a context in which we didn't -- and realistically couldn't -- correctly
infer how the enclosing function would be used.

Instead, add the initialization function to a COMDAT from the code that
creates it, in the case where it makes sense to do so: when we know that
the one and only reference to the initialization function is in
@llvm.global.ctors and that reference is in the same COMDAT.

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D108680
2021-08-24 19:53:44 -07:00
..
APINotes [clang][APINotes] Fix -Wunused-function warning (NFC) 2021-04-01 09:52:43 +08:00
ARCMigrate [clang] Introduce SourceLocation::[U]IntTy typedefs. 2021-07-21 10:45:46 +01:00
AST Revert "[AST] Pick last tentative definition as the acting definition" 2021-08-24 11:41:50 -05:00
ASTMatchers Reapply "Support Attr in DynTypedNode and ASTMatchers." 2021-08-06 22:30:32 +02:00
Analysis [analyzer][NFC] Display the correct function name even in crash dumps 2021-07-12 09:06:46 +02:00
Basic [NFC][clang] Move remaining part of X86Target.def to llvm/Support/X86TargetParser.def 2021-08-24 09:16:31 -07:00
CodeGen PR48030: Fix COMDAT-related linking problem with C++ thread_local static data members. 2021-08-24 19:53:44 -07:00
CrossTU PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23 2021-07-08 13:37:57 -07:00
DirectoryWatcher Revert "Re-Revert "DirectoryWatcher: add an implementation for Windows"" 2021-06-19 09:19:52 -07:00
Driver [WebAssembly] Add Wasm SjLj option support for clang 2021-08-24 18:12:52 -07:00
Edit [Matrix] Implement C-style explicit type conversions for matrix types. 2021-04-10 11:48:41 +01:00
Format [clang-format] keep TypeScript argument decorators in line 2021-08-24 12:37:08 +02:00
Frontend Fix unknown parameter Wdocumentation warning. NFC. 2021-08-19 15:40:10 +01:00
FrontendTool [OptTable] Rename PrintHelp to printHelp 2021-06-24 14:47:03 -07:00
Headers [OpenMP][AMDGCN] Enable complex functions 2021-08-24 12:40:41 +05:30
Index [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
IndexSerialization
Interpreter Reland "[clang-repl] Implement partial translation units and error recovery." 2021-07-12 15:21:22 +00:00
Lex Implement #pragma clang restrict_expansion 2021-08-23 09:46:38 -07:00
Parse Fix a typo around 'builtin' 2021-08-18 17:42:12 +08:00
Rewrite [analyzer] Highlight arrows for currently selected event 2021-08-02 19:15:01 +03:00
Sema Avoid nullptr dereferencing of 'Constraint'; NFC 2021-08-24 07:08:18 -04:00
Serialization Extend diagnostic for out of date AST input file. 2021-08-24 17:03:06 -07:00
StaticAnalyzer Fix unknown parameter Wdocumentation warning. NFC. 2021-08-19 15:40:10 +01:00
Testing
Tooling [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
CMakeLists.txt [clang-repl] Recommit "Land initial infrastructure for incremental parsing" 2021-05-13 06:30:29 +00:00