diff options
author | Alexander Potapenko <glider@google.com> | 2013-12-25 16:46:27 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2013-12-25 16:46:27 +0000 |
commit | 4f0335f86345f823afed5410b2249bc768b06d23 (patch) | |
tree | 730926ed3b0f59324da664957adae1d30d045663 /llvm/lib/Transforms | |
parent | daf96ae81b7c8e57bf578b7a04b9b63e503d23c0 (diff) | |
download | bcm5719-llvm-4f0335f86345f823afed5410b2249bc768b06d23.tar.gz bcm5719-llvm-4f0335f86345f823afed5410b2249bc768b06d23.zip |
[ASan] Fix the test for __asan_gen_ globals and actually fix http://llvm.org/bugs/show_bug.cgi?id=17976
by setting the correct linkage (as stated in the bug).
llvm-svn: 198018
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 72825f5f6f4..511c63b5eb9 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -562,13 +562,13 @@ static GlobalVariable *createPrivateGlobalForString( Module &M, StringRef Str, bool AllowMerging) { Constant *StrConst = ConstantDataArray::getString(M.getContext(), Str); // For module-local strings that can be merged with another one we set the - // internal linkage and the unnamed_addr attribute. + // private linkage and the unnamed_addr attribute. // Non-mergeable strings are made linker_private to remove them from the // symbol table. "private" linkage doesn't work for Darwin, where the // "L"-prefixed globals end up in __TEXT,__const section // (see http://llvm.org/bugs/show_bug.cgi?id=17976 for more info). GlobalValue::LinkageTypes linkage = - AllowMerging ? GlobalValue::InternalLinkage + AllowMerging ? GlobalValue::PrivateLinkage : GlobalValue::LinkerPrivateLinkage; GlobalVariable *GV = new GlobalVariable(M, StrConst->getType(), true, |