diff options
author | Kostya Serebryany <kcc@google.com> | 2013-11-15 09:52:05 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2013-11-15 09:52:05 +0000 |
commit | 0604c62d7b6fce48f1c8000453903951dc6cfc10 (patch) | |
tree | 0f840602ae8fd4e3e8d569d35b86073485a8c0ce /llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | |
parent | 67421c1087a8c69776b0bdbe3951b7012b55c5bf (diff) | |
download | bcm5719-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.cpp | 2 |
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); |