[asan] simplify the code around doesNotReturn call. It now magically works.

llvm-svn: 168995
This commit is contained in:
Kostya Serebryany 2012-11-30 11:08:59 +00:00
parent adc29e11d0
commit 817b60af38
1 changed files with 1 additions and 8 deletions

View File

@ -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);
}
}