[cfe-commits] r97131 - in /cfe/trunk/lib/Checker: CallInliner.cpp GRCoreEngine.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Wed Feb 24 23:57:35 PST 2010
Author: zhongxingxu
Date: Thu Feb 25 01:57:35 2010
New Revision: 97131
URL: http://llvm.org/viewvc/llvm-project?rev=97131&view=rev
Log:
Move the GenerateCallExitNode logic completely into GREndPathNodeBuilder.
Modified:
cfe/trunk/lib/Checker/CallInliner.cpp
cfe/trunk/lib/Checker/GRCoreEngine.cpp
Modified: cfe/trunk/lib/Checker/CallInliner.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CallInliner.cpp?rev=97131&r1=97130&r2=97131&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CallInliner.cpp (original)
+++ cfe/trunk/lib/Checker/CallInliner.cpp Thu Feb 25 01:57:35 2010
@@ -26,7 +26,6 @@
}
virtual bool EvalCallExpr(CheckerContext &C, const CallExpr *CE);
- virtual void EvalEndPath(GREndPathNodeBuilder &B,void *tag,GRExprEngine &Eng);
};
}
@@ -53,17 +52,3 @@
return true;
}
-void CallInliner::EvalEndPath(GREndPathNodeBuilder &B, void *tag,
- GRExprEngine &Eng) {
- const GRState *state = B.getState();
-
- ExplodedNode *Pred = B.getPredecessor();
-
- const StackFrameContext *LocCtx =
- cast<StackFrameContext>(Pred->getLocationContext());
- // Check if this is the top level stack frame.
- if (!LocCtx->getParent())
- return;
-
- B.GenerateCallExitNode(state);
-}
Modified: cfe/trunk/lib/Checker/GRCoreEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRCoreEngine.cpp?rev=97131&r1=97130&r2=97131&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRCoreEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRCoreEngine.cpp Thu Feb 25 01:57:35 2010
@@ -612,7 +612,13 @@
GREndPathNodeBuilder::~GREndPathNodeBuilder() {
// Auto-generate an EOP node if one has not been generated.
- if (!HasGeneratedNode) generateNode(Pred->State);
+ if (!HasGeneratedNode) {
+ // If we are in an inlined call, generate CallExit node.
+ if (Pred->getLocationContext()->getParent())
+ GenerateCallExitNode(Pred->State);
+ else
+ generateNode(Pred->State);
+ }
}
ExplodedNode*
More information about the cfe-commits
mailing list