summaryrefslogtreecommitdiff
path: root/lib/Transforms
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
commit8f15c6822251bbe7eb21732c46aa6d9f30ba8836 (patch)
treea11c82930c29fce0582fb9feac9a2fda0577e03a /lib/Transforms
parentd881c1bdd1f63bbbdb8eec5f6ae7fd765103972f (diff)
downloadllvm-8f15c6822251bbe7eb21732c46aa6d9f30ba8836.tar.gz
llvm-8f15c6822251bbe7eb21732c46aa6d9f30ba8836.tar.bz2
llvm-8f15c6822251bbe7eb21732c46aa6d9f30ba8836.tar.xz
[asan] use GlobalValue::PrivateLinkage for coverage guard to save quite a bit of code size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194800 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Instrumentation/AddressSanitizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 77e9e0ea13..d8c3f8eafb 100644
--- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/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);