diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-05 07:09:07 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-05 07:09:07 +0000 |
commit | c79407fc4077ba5ba8a72e7fc64bfbba777f333c (patch) | |
tree | d7cc7681d9d9ce61b47b2d689d99763c9b2bd137 /clang/lib/CodeGen/CGCall.cpp | |
parent | 9103df1688c3fdd3b2b85bffc026c0f3a07e38b4 (diff) | |
download | bcm5719-llvm-c79407fc4077ba5ba8a72e7fc64bfbba777f333c.tar.gz bcm5719-llvm-c79407fc4077ba5ba8a72e7fc64bfbba777f333c.zip |
Pull CodeGenFunction::GetUndefRValue() out of EmitUnsupportedRValue.
llvm-svn: 63845
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index b7459b22299..0d0dd33d476 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/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. |