aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-05 07:09:07 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-05 07:09:07 +0000
commit13e81737a433b23f8c662d10d1d57356122a8caa (patch)
treedf3ed60c11fcabe626185f2591271de28acfa9fd /lib/CodeGen/CGCall.cpp
parent026c66395b88a09437319139a43b090093f7e1dd (diff)
Pull CodeGenFunction::GetUndefRValue() out of EmitUnsupportedRValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index b7459b2229..0d0dd33d47 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1430,17 +1430,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
return RValue::get(CI);
case ABIArgInfo::Ignore:
- if (RetTy->isVoidType())
- return RValue::get(0);
-
// If we are ignoring an argument that had a result, make sure to
// construct the appropriate return value for our caller.
- if (CodeGenFunction::hasAggregateLLVMType(RetTy)) {
- llvm::Value *Res =
- llvm::UndefValue::get(llvm::PointerType::getUnqual(ConvertType(RetTy)));
- return RValue::getAggregate(Res);
- }
- return RValue::get(llvm::UndefValue::get(ConvertType(RetTy)));
+ return GetUndefRValue(RetTy);
+ if (RetTy->isVoidType())
+ return RValue::get(0);
case ABIArgInfo::Coerce: {
// FIXME: Avoid the conversion through memory if possible.