Ignore debug info while evaluating function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66490 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2009-03-09 23:04:12 +00:00
parent 9d10086797
commit 412a446974
2 changed files with 105 additions and 1 deletions
+7 -1
View File
@@ -2199,6 +2199,13 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal,
AI->getName()));
InstResult = AllocaTmps.back();
} else if (CallInst *CI = dyn_cast<CallInst>(CurInst)) {
// Debug info can safely be ignored here.
if (isa<DbgInfoIntrinsic>(CI)) {
++CurInst;
continue;
}
// Cannot handle inline asm.
if (isa<InlineAsm>(CI->getOperand(0))) return false;
@@ -2224,7 +2231,6 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal,
return false;
Constant *RetVal;
// Execute the call, if successful, use the return value.
if (!EvaluateFunction(Callee, RetVal, Formals, CallStack,
MutatedMemory, AllocaTmps))