forked from OSchip/llvm-project
parent
6c5abe88bf
commit
726b3d09cd
|
@ -800,10 +800,13 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
|
|||
|
||||
void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
|
||||
llvm::Value *ReturnValue) {
|
||||
llvm::Value *RV = 0;
|
||||
|
||||
// Functions with no result always return void.
|
||||
if (ReturnValue) {
|
||||
if (ReturnValue == 0) {
|
||||
Builder.CreateRetVoid();
|
||||
return;
|
||||
}
|
||||
|
||||
llvm::Value *RV = 0;
|
||||
QualType RetTy = FI.getReturnType();
|
||||
const ABIArgInfo &RetAI = FI.getReturnInfo();
|
||||
|
||||
|
@ -837,14 +840,12 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
|
|||
case ABIArgInfo::Expand:
|
||||
assert(0 && "Invalid ABI kind for return argument");
|
||||
}
|
||||
}
|
||||
|
||||
if (RV) {
|
||||
if (RV)
|
||||
Builder.CreateRet(RV);
|
||||
} else {
|
||||
else
|
||||
Builder.CreateRetVoid();
|
||||
}
|
||||
}
|
||||
|
||||
RValue CodeGenFunction::EmitDelegateCallArg(const VarDecl *Param) {
|
||||
// StartFunction converted the ABI-lowered parameter(s) into a
|
||||
|
|
Loading…
Reference in New Issue