diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-24 13:08:51 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-24 13:08:51 +0000 |
commit | a1a9ba11b78509dd11a2b69dae0c6049118f245c (patch) | |
tree | 32de44932d30c793244fc0ea9b7d867e85c32357 /clang/lib/Analysis/AnalysisContext.cpp | |
parent | e0a1d2b32c5c070c0cdda9f50f9b8698745dc4cf (diff) | |
download | bcm5719-llvm-a1a9ba11b78509dd11a2b69dae0c6049118f245c.tar.gz bcm5719-llvm-a1a9ba11b78509dd11a2b69dae0c6049118f245c.zip |
Let StackFrameContext represent if the call expr is evaluated as lvalue.
This is required for supporting const reference to temporary objects.
llvm-svn: 120093
Diffstat (limited to 'clang/lib/Analysis/AnalysisContext.cpp')
-rw-r--r-- | clang/lib/Analysis/AnalysisContext.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Analysis/AnalysisContext.cpp b/clang/lib/Analysis/AnalysisContext.cpp index 68c5e158f3a..5307074dce6 100644 --- a/clang/lib/Analysis/AnalysisContext.cpp +++ b/clang/lib/Analysis/AnalysisContext.cpp @@ -152,7 +152,8 @@ void LocationContext::ProfileCommon(llvm::FoldingSetNodeID &ID, } void StackFrameContext::Profile(llvm::FoldingSetNodeID &ID) { - Profile(ID, getAnalysisContext(), getParent(), CallSite, Block, Index); + Profile(ID, getAnalysisContext(), getParent(), CallSite.getPointer(), + CallSite.getInt(), Block, Index); } void ScopeContext::Profile(llvm::FoldingSetNodeID &ID) { @@ -188,15 +189,15 @@ LocationContextManager::getLocationContext(AnalysisContext *ctx, const StackFrameContext* LocationContextManager::getStackFrame(AnalysisContext *ctx, const LocationContext *parent, - const Stmt *s, const CFGBlock *blk, - unsigned idx) { + const Stmt *s, bool asLValue, + const CFGBlock *blk, unsigned idx) { llvm::FoldingSetNodeID ID; - StackFrameContext::Profile(ID, ctx, parent, s, blk, idx); + StackFrameContext::Profile(ID, ctx, parent, s, asLValue, blk, idx); void *InsertPos; StackFrameContext *L = cast_or_null<StackFrameContext>(Contexts.FindNodeOrInsertPos(ID, InsertPos)); if (!L) { - L = new StackFrameContext(ctx, parent, s, blk, idx); + L = new StackFrameContext(ctx, parent, s, asLValue, blk, idx); Contexts.InsertNode(L, InsertPos); } return L; |