aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues.cpp
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-03-10 09:12:28 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-03-10 09:13:41 +0100
commita72dc86cddd26921f12184032e27abcc3be427cb (patch)
tree926c5bfb989d1693f639242285a788d237996b66 /llvm/lib/CodeGen/LiveDebugValues.cpp
parentef4f939d389e2abe6fdce45bd49cc71237429cb6 (diff)
downloadllvm-a72dc86cddd26921f12184032e27abcc3be427cb.zip
llvm-a72dc86cddd26921f12184032e27abcc3be427cb.tar.gz
llvm-a72dc86cddd26921f12184032e27abcc3be427cb.tar.bz2
tsan: tsan_interface.h: make constants static
Note that in C++ the static keyword is implicit for const objects. In C however it is not, and we get clashes at link time after including the header from more than one C file: lib.a(bar.o):(.rodata+0x0): multiple definition of `__tsan_mutex_linker_init' lib.a(foo.o):(.rodata+0x0): first defined here lib.a(bar.o):(.rodata+0xc): multiple definition of `__tsan_mutex_not_static' lib.a(foo.o):(.rodata+0xc): first defined here <snip> Indeed both foo.o and bar.o define the clashing symbols: $ nm foo.o <snip> 0000000000000000 R __tsan_mutex_linker_init 000000000000000c R __tsan_mutex_not_static <snip> Fix it by explicitly making the constants static. Reviewed-in: https://reviews.llvm.org/D75820 Author: cota (Emilio G. Cota)
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues.cpp')
0 files changed, 0 insertions, 0 deletions