[llvm] r194800 - [asan] use GlobalValue::PrivateLinkage for coverage guard to save quite a bit of code size

Kostya Serebryany kcc at google.com
Fri Nov 15 01:52:06 PST 2013


Author: kcc
Date: Fri Nov 15 03:52:05 2013
New Revision: 194800

URL: http://llvm.org/viewvc/llvm-project?rev=194800&view=rev
Log:
[asan] use GlobalValue::PrivateLinkage for coverage guard to save quite a bit of code size

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=194800&r1=194799&r2=194800&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Fri Nov 15 03:52:05 2013
@@ -1187,7 +1187,7 @@ bool AddressSanitizer::InjectCoverage(Fu
   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);





More information about the llvm-commits mailing list