1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

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

llvm-svn: 194800
This commit is contained in:
Kostya Serebryany 2013-11-15 09:52:05 +00:00
parent 0207e765c7
commit 3b2f8ea060

View File

@ -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);