mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
[ASan] Fix comments about __sanitizer_cov function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213673 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1311,8 +1311,7 @@ void AddressSanitizer::InjectCoverageAtBlock(Function &F, BasicBlock &BB) {
|
|||||||
Cmp, IP, false, MDBuilder(*C).createBranchWeights(1, 100000));
|
Cmp, IP, false, MDBuilder(*C).createBranchWeights(1, 100000));
|
||||||
IRB.SetInsertPoint(Ins);
|
IRB.SetInsertPoint(Ins);
|
||||||
IRB.SetCurrentDebugLocation(EntryLoc);
|
IRB.SetCurrentDebugLocation(EntryLoc);
|
||||||
// We pass &F to __sanitizer_cov. We could avoid this and rely on
|
// __sanitizer_cov gets the PC of the instruction using GET_CALLER_PC.
|
||||||
// GET_CALLER_PC, but having the PC of the first instruction is just nice.
|
|
||||||
IRB.CreateCall(AsanCovFunction);
|
IRB.CreateCall(AsanCovFunction);
|
||||||
StoreInst *Store = IRB.CreateStore(ConstantInt::get(Int8Ty, 1), Guard);
|
StoreInst *Store = IRB.CreateStore(ConstantInt::get(Int8Ty, 1), Guard);
|
||||||
Store->setAtomic(Monotonic);
|
Store->setAtomic(Monotonic);
|
||||||
@@ -1324,7 +1323,7 @@ void AddressSanitizer::InjectCoverageAtBlock(Function &F, BasicBlock &BB) {
|
|||||||
// as the function and inject this code into the entry block (-asan-coverage=1)
|
// as the function and inject this code into the entry block (-asan-coverage=1)
|
||||||
// or all blocks (-asan-coverage=2):
|
// or all blocks (-asan-coverage=2):
|
||||||
// if (*Guard) {
|
// if (*Guard) {
|
||||||
// __sanitizer_cov(&F);
|
// __sanitizer_cov();
|
||||||
// *Guard = 1;
|
// *Guard = 1;
|
||||||
// }
|
// }
|
||||||
// The accesses to Guard are atomic. The rest of the logic is
|
// The accesses to Guard are atomic. The rest of the logic is
|
||||||
|
Reference in New Issue
Block a user