diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-24 08:53:20 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-24 08:53:20 +0000 |
| commit | cb29802198d0f0fc623c53b34af64f364f1ea45f (patch) | |
| tree | 4f4b6b4b3b1d86aea5be76983f9be18801beeb2e /clang/lib/Checker/GRCoreEngine.cpp | |
| parent | 9b6e6b087f79605335562dd62a3048dc509c4de3 (diff) | |
| download | bcm5719-llvm-cb29802198d0f0fc623c53b34af64f364f1ea45f.tar.gz bcm5719-llvm-cb29802198d0f0fc623c53b34af64f364f1ea45f.zip | |
Use StackFrameContext directly in CallEnter program point. Then we don't need
to remake the stackframe everytime in GRExprEngine::ProcessCallEnter().
llvm-svn: 120087
Diffstat (limited to 'clang/lib/Checker/GRCoreEngine.cpp')
| -rw-r--r-- | clang/lib/Checker/GRCoreEngine.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Checker/GRCoreEngine.cpp b/clang/lib/Checker/GRCoreEngine.cpp index a121cbbcd11..270985f4164 100644 --- a/clang/lib/Checker/GRCoreEngine.cpp +++ b/clang/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); |

