Add basic codegen for thunks that return values.

llvm-svn: 85842
This commit is contained in:
Mike Stump 2009-11-02 23:47:45 +00:00
parent b70ef3c8c7
commit 31e1d43729
1 changed files with 5 additions and 2 deletions

View File

@ -752,12 +752,15 @@ llvm::Constant *CodeGenFunction::GenerateCovariantThunk(llvm::Function *Fn,
CallArgs.push_back(std::make_pair(EmitCallArg(Arg, ArgType), ArgType));
}
EmitCall(CGM.getTypes().getFunctionInfo(ResultType, CallArgs),
Callee, CallArgs, MD);
RValue RV = EmitCall(CGM.getTypes().getFunctionInfo(ResultType, CallArgs),
Callee, CallArgs, MD);
if (nv_r || v_r) {
// FIXME: Add return value adjustments.
}
if (!ResultType->isVoidType())
EmitReturnOfRValue(RV, ResultType);
FinishFunction();
return Fn;
}