summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-11-15 09:52:05 +0000
committerKostya Serebryany <kcc@google.com>2013-11-15 09:52:05 +0000
commit0604c62d7b6fce48f1c8000453903951dc6cfc10 (patch)
tree0f840602ae8fd4e3e8d569d35b86073485a8c0ce /llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
parent67421c1087a8c69776b0bdbe3951b7012b55c5bf (diff)
downloadbcm5719-llvm-0604c62d7b6fce48f1c8000453903951dc6cfc10.tar.gz
bcm5719-llvm-0604c62d7b6fce48f1c8000453903951dc6cfc10.zip
[asan] use GlobalValue::PrivateLinkage for coverage guard to save quite a bit of code size
llvm-svn: 194800
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 77e9e0ea13d..d8c3f8eafb7 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -1187,7 +1187,7 @@ bool AddressSanitizer::InjectCoverage(Function &F) {
IRBuilder<> IRB(F.getEntryBlock().getFirstInsertionPt());
Type *Int8Ty = IRB.getInt8Ty();
GlobalVariable *Guard = new GlobalVariable(
- *F.getParent(), Int8Ty, false, F.getLinkage(),
+ *F.getParent(), Int8Ty, false, GlobalValue::PrivateLinkage,
Constant::getNullValue(Int8Ty), "__asan_gen_cov_" + F.getName());
LoadInst *Load = IRB.CreateLoad(Guard);
Load->setAtomic(Monotonic);
OpenPOWER on IntegriCloud