[cfe-commits] r85842 - /cfe/trunk/lib/CodeGen/CGCXX.cpp
Mike Stump
mrs at apple.com
Mon Nov 2 15:47:45 PST 2009
Author: mrs
Date: Mon Nov 2 17:47:45 2009
New Revision: 85842
URL: http://llvm.org/viewvc/llvm-project?rev=85842&view=rev
Log:
Add basic codegen for thunks that return values.
Modified:
cfe/trunk/lib/CodeGen/CGCXX.cpp
Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=85842&r1=85841&r2=85842&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Mon Nov 2 17:47:45 2009
@@ -752,12 +752,15 @@
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;
}
More information about the cfe-commits
mailing list