diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-07-22 17:46:09 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-07-22 17:46:09 +0000 |
commit | bad4d0c38a1fc9f7da1bc16d6eec290a249e0fb6 (patch) | |
tree | cbca11907a643b18fbb050d6944d94019a66c81f /llvm/lib/Transforms | |
parent | 4339903c94927e33ab7b2804f0a6cae0687dc75a (diff) | |
download | bcm5719-llvm-bad4d0c38a1fc9f7da1bc16d6eec290a249e0fb6.tar.gz bcm5719-llvm-bad4d0c38a1fc9f7da1bc16d6eec290a249e0fb6.zip |
[ASan] Fix comments about __sanitizer_cov function
llvm-svn: 213673
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 124ffe2f8f8..ad3abed2a37 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -1311,8 +1311,7 @@ void AddressSanitizer::InjectCoverageAtBlock(Function &F, BasicBlock &BB) { Cmp, IP, false, MDBuilder(*C).createBranchWeights(1, 100000)); IRB.SetInsertPoint(Ins); IRB.SetCurrentDebugLocation(EntryLoc); - // We pass &F to __sanitizer_cov. We could avoid this and rely on - // GET_CALLER_PC, but having the PC of the first instruction is just nice. + // __sanitizer_cov gets the PC of the instruction using GET_CALLER_PC. IRB.CreateCall(AsanCovFunction); StoreInst *Store = IRB.CreateStore(ConstantInt::get(Int8Ty, 1), Guard); 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) // or all blocks (-asan-coverage=2): // if (*Guard) { -// __sanitizer_cov(&F); +// __sanitizer_cov(); // *Guard = 1; // } // The accesses to Guard are atomic. The rest of the logic is |