diff options
author | Manman Ren <mren@apple.com> | 2013-03-26 18:29:15 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-03-26 18:29:15 +0000 |
commit | 94d46b55103bf7ba0dc5425baf1eb7e4adcaa7ea (patch) | |
tree | 83b32304662c61c4103c540bbc5ca9e5178c8197 /lib/CodeGen/CGCall.cpp | |
parent | e2359e21320f39b167b31afb0c281419361faa51 (diff) |
Fix uninitialized read of CalleeWithThisReturn.
Initialize CalleeWithThisReturn to 0 in the constructor.
Also revert r170815 since checking CalleeWithThisReturn is faster.
PR15598
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 1fb88b009f..faf32e3008 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -1722,7 +1722,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI) { // the same object as CXXThisValue, use the return value from the CallInst. // We will not need to keep 'this' alive through the callsite. It also enables // optimizations in the backend, such as tail call optimization. - if (CGM.getCXXABI().HasThisReturn(CurGD) && CalleeWithThisReturn) { + if (CalleeWithThisReturn && CGM.getCXXABI().HasThisReturn(CurGD)) { llvm::BasicBlock *IP = Builder.GetInsertBlock(); llvm::CallInst *Callsite; if (!IP->empty() && (Callsite = dyn_cast<llvm::CallInst>(&IP->back())) && |