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 | af2bcba81b87ffacfefada5be0afde2d20c365b1 (patch) | |
| tree | 124366f8851b6c8a62491f46f8ad93336ba471a6 /lib/CodeGen/TargetInfo.cpp | |
| parent | a6bf8b86f490ebce4b6978ce2ae373b865dd33e5 (diff) | |
| download | clang-af2bcba81b87ffacfefada5be0afde2d20c365b1.tar.gz clang-af2bcba81b87ffacfefada5be0afde2d20c365b1.tar.bz2 clang-af2bcba81b87ffacfefada5be0afde2d20c365b1.tar.xz | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
| -rw-r--r-- | lib/CodeGen/TargetInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index 47c5269ec5..246f238e65 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/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 |
