mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-16 23:19:37 +00:00
[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
This commit is contained in:
parent
d881c1bdd1
commit
8f15c68222
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user