summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/AddressSanitizer.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-11-30 11:08:59 +0000
committerKostya Serebryany <kcc@google.com>2012-11-30 11:08:59 +0000
commita17babb021aa9dc3441ecce1ac8a62d2b27edecb (patch)
tree46fd1d1cdc2944b8551c0fca5d832306f4c4e2e2 /lib/Transforms/Instrumentation/AddressSanitizer.cpp
parenta5bf44b0b396e8b9ae0db5c62c05ac6618aab5d3 (diff)
downloadllvm-a17babb021aa9dc3441ecce1ac8a62d2b27edecb.tar.gz
llvm-a17babb021aa9dc3441ecce1ac8a62d2b27edecb.tar.bz2
llvm-a17babb021aa9dc3441ecce1ac8a62d2b27edecb.tar.xz
[asan] simplify the code around doesNotReturn call. It now magically works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r--lib/Transforms/Instrumentation/AddressSanitizer.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 8ebc5d25e9..c0690f58c6 100644
--- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/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);
}
}