summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-01-23 23:18:57 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-01-23 23:18:57 +0000
commit60f5fe685709776763d8e78be7ece99ef03bd3ad (patch)
tree35b3423051c11fea704c93a6f56da07b173e3587 /clang/lib/CodeGen
parentfab7a91d92f1af58b2cfd04d01d6a6080d49a66e (diff)
downloadbcm5719-llvm-60f5fe685709776763d8e78be7ece99ef03bd3ad.tar.gz
bcm5719-llvm-60f5fe685709776763d8e78be7ece99ef03bd3ad.zip
Ignore return type if its size is zero.
llvm-svn: 148744
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 88bf8fe1229..c51ce91371e 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -3222,11 +3222,12 @@ MipsABIInfo::returnAggregateInRegs(QualType RetTy, uint64_t Size) const {
}
ABIArgInfo MipsABIInfo::classifyReturnType(QualType RetTy) const {
- if (RetTy->isVoidType())
+ uint64_t Size = getContext().getTypeSize(RetTy);
+
+ if (RetTy->isVoidType() || Size == 0)
return ABIArgInfo::getIgnore();
if (isAggregateTypeForABI(RetTy)) {
- uint64_t Size = getContext().getTypeSize(RetTy);
if (Size <= 128) {
if (RetTy->isAnyComplexType())
return ABIArgInfo::getDirect();
OpenPOWER on IntegriCloud