aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/GRCoreEngine.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-11-24 08:53:20 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-11-24 08:53:20 +0000
commit19b78d9e3dbbc27bbcbdd8c3017a00fe88849ecd (patch)
tree313c72a34a82e178a70c3e47e395c0ae564cb99a /lib/Checker/GRCoreEngine.cpp
parent5281b8ed0e395603e5ff15ecc01ee0d0dff2e0fd (diff)
Use StackFrameContext directly in CallEnter program point. Then we don't need
to remake the stackframe everytime in GRExprEngine::ProcessCallEnter(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRCoreEngine.cpp')
-rw-r--r--lib/Checker/GRCoreEngine.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Checker/GRCoreEngine.cpp b/lib/Checker/GRCoreEngine.cpp
index a121cbbcd1..270985f416 100644
--- a/lib/Checker/GRCoreEngine.cpp
+++ b/lib/Checker/GRCoreEngine.cpp
@@ -715,8 +715,7 @@ void GREndPathNodeBuilder::GenerateCallExitNode(const GRState *state) {
}
-void GRCallEnterNodeBuilder::GenerateNode(const GRState *state,
- const LocationContext *LocCtx) {
+void GRCallEnterNodeBuilder::GenerateNode(const GRState *state) {
// Check if the callee is in the same translation unit.
if (CalleeCtx->getTranslationUnit() !=
Pred->getLocationContext()->getTranslationUnit()) {
@@ -756,7 +755,7 @@ void GRCallEnterNodeBuilder::GenerateNode(const GRState *state,
// Create the new LocationContext.
AnalysisContext *NewAnaCtx = AMgr.getAnalysisContext(CalleeCtx->getDecl(),
CalleeCtx->getTranslationUnit());
- const StackFrameContext *OldLocCtx = cast<StackFrameContext>(LocCtx);
+ const StackFrameContext *OldLocCtx = CalleeCtx;
const StackFrameContext *NewLocCtx = AMgr.getStackFrame(NewAnaCtx,
OldLocCtx->getParent(),
OldLocCtx->getCallSite(),
@@ -773,7 +772,7 @@ void GRCallEnterNodeBuilder::GenerateNode(const GRState *state,
}
// Get the callee entry block.
- const CFGBlock *Entry = &(LocCtx->getCFG()->getEntry());
+ const CFGBlock *Entry = &(CalleeCtx->getCFG()->getEntry());
assert(Entry->empty());
assert(Entry->succ_size() == 1);
@@ -781,7 +780,7 @@ void GRCallEnterNodeBuilder::GenerateNode(const GRState *state,
const CFGBlock *SuccB = *(Entry->succ_begin());
// Construct an edge representing the starting location in the callee.
- BlockEdge Loc(Entry, SuccB, LocCtx);
+ BlockEdge Loc(Entry, SuccB, CalleeCtx);
bool isNew;
ExplodedNode *Node = Eng.G->getNode(Loc, state, &isNew);