diff options
author | Tim Northover <tnorthover@apple.com> | 2014-04-18 13:46:08 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-04-18 13:46:08 +0000 |
commit | 4dab69815c9357b7c2b3fe91718e569cc5c0ac6a (patch) | |
tree | 84de4a2afe93ba79f114957f0257d513cbf34867 /clang/lib/CodeGen/TargetInfo.cpp | |
parent | 561c4db707a600d6902c2c345ec37c4349a11c87 (diff) | |
download | bcm5719-llvm-4dab69815c9357b7c2b3fe91718e569cc5c0ac6a.tar.gz bcm5719-llvm-4dab69815c9357b7c2b3fe91718e569cc5c0ac6a.zip |
ARM64: make sure the caller is expected to extend in AAPCS.
This is one of those DarwinPCS differences. It'd been caught in
arguments, but not return values.
llvm-svn: 206594
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 47c5269ec5a..246f238e658 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -3368,8 +3368,9 @@ ABIArgInfo ARM64ABIInfo::classifyReturnType(QualType RetTy) const { if (const EnumType *EnumTy = RetTy->getAs<EnumType>()) RetTy = EnumTy->getDecl()->getIntegerType(); - return (RetTy->isPromotableIntegerType() ? ABIArgInfo::getExtend() - : ABIArgInfo::getDirect()); + return (RetTy->isPromotableIntegerType() && isDarwinPCS() + ? ABIArgInfo::getExtend() + : ABIArgInfo::getDirect()); } // Structures with either a non-trivial destructor or a non-trivial |