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(&IP->back())) && diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 473a1cba76..2c3cabe985 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -42,7 +42,8 @@ CodeGenFunction::CodeGenFunction(CodeGenModule &cgm, bool suppressNewContext) AutoreleaseResult(false), BlockInfo(0), BlockPointer(0), LambdaThisCaptureField(0), NormalCleanupDest(0), NextCleanupDestIndex(1), FirstBlockInfo(0), EHResumeBlock(0), ExceptionSlot(0), EHSelectorSlot(0), - DebugInfo(0), DisableDebugInfo(false), DidCallStackSave(false), + DebugInfo(0), DisableDebugInfo(false), CalleeWithThisReturn(0), + DidCallStackSave(false), IndirectBranch(0), SwitchInsn(0), CaseRangeBlock(0), UnreachableBlock(0), CXXABIThisDecl(0), CXXABIThisValue(0), CXXThisValue(0), CXXStructorImplicitParamDecl(0), CXXStructorImplicitParamValue(0),