aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorSebastian Neubauer <Sebastian.Neubauer@amd.com>2023-04-24 10:34:59 +0200
committerSebastian Neubauer <Sebastian.Neubauer@amd.com>2023-04-24 10:34:59 +0200
commit920cbe84054f7386a6bd31afa7111a2a3634b454 (patch)
treebbac4ee9b7f8142ccb2b24669df1d56c80e03feb /clang/lib/CodeGen/CodeGenModule.cpp
parent61cddaa2dabba070b339f48f38106ae2e7f3e6a2 (diff)
downloadllvm-920cbe84054f7386a6bd31afa7111a2a3634b454.zip
llvm-920cbe84054f7386a6bd31afa7111a2a3634b454.tar.gz
llvm-920cbe84054f7386a6bd31afa7111a2a3634b454.tar.bz2
[llvm][ADT] Fix Any linker error with multiple compilers
Citing the comment in the source: Define the type id and initialize with a non-zero value. Initializing with a zero value means the variab can end up in either the .data or the .bss section. This can lead to multiple definition linker errors when some object files are compiled with a compiler that puts the variable into .data but they are linked to object files from a different compiler that put the variable into .bss. To prevent this issue from happening, initialize the variable with a non-zero value, which forces it to land in .data (because .bss is zero-initialized). Fixes https://github.com/llvm/llvm-project/issues/62270 A regression of D139974. Differential Revision: https://reviews.llvm.org/D148953
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions