diff options
author | Kostya Serebryany <kcc@google.com> | 2012-11-30 11:08:59 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-11-30 11:08:59 +0000 |
commit | 817b60af38a48f9f838edcecca5f8a2172dfb287 (patch) | |
tree | 3a91930d7b12acec12a3a16b20e0587175b183bf /llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | |
parent | adc29e11d06cdc0817a925f3cbcd073fcabdeca3 (diff) | |
download | bcm5719-llvm-817b60af38a48f9f838edcecca5f8a2172dfb287.tar.gz bcm5719-llvm-817b60af38a48f9f838edcecca5f8a2172dfb287.zip |
[asan] simplify the code around doesNotReturn call. It now magically works.
llvm-svn: 168995
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 8ebc5d25e9f..c0690f58c60 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -867,13 +867,6 @@ bool AddressSanitizer::maybeInsertAsanInitAtFunctionEntry(Function &F) { return false; } -// Check both the call and the callee for doesNotReturn(). -static bool isNoReturnCall(CallInst *CI) { - if (CI->doesNotReturn()) return true; - Function *F = CI->getCalledFunction(); - return (F && F->doesNotReturn()); -} - bool AddressSanitizer::runOnFunction(Function &F) { if (BL->isIn(F)) return false; if (&F == AsanCtorFunction) return false; @@ -915,7 +908,7 @@ bool AddressSanitizer::runOnFunction(Function &F) { if (CallInst *CI = dyn_cast<CallInst>(BI)) { // A call inside BB. TempsToInstrument.clear(); - if (isNoReturnCall(CI)) { + if (CI->doesNotReturn()) { NoReturnCalls.push_back(CI); } } |