summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorJulien Lerouge <jlerouge@apple.com>2014-08-27 00:36:55 +0000
committerJulien Lerouge <jlerouge@apple.com>2014-08-27 00:36:55 +0000
commit10dcff81be7c03ccf254f6334815c754c6ae4121 (patch)
treecb7ffb568702bf250abd9b68046e07e898cb60b1 /clang/lib/CodeGen/TargetInfo.cpp
parent23ea50eee44aba71db272d75d25624eb7241326f (diff)
downloadbcm5719-llvm-10dcff81be7c03ccf254f6334815c754c6ae4121.tar.gz
bcm5719-llvm-10dcff81be7c03ccf254f6334815c754c6ae4121.zip
Re-apply r216491 (Win64 ABI shouldn't extend integer type arguments.)
This time though, preserve the extension for bool types since that's compatible with what MSVC expects. See http://reviews.llvm.org/D4380 llvm-svn: 216507
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r--clang/lib/CodeGen/TargetInfo.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index ea5f7c22399..8340261ad8f 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -2773,7 +2773,10 @@ ABIArgInfo WinX86_64ABIInfo::classify(QualType Ty, bool IsReturnType) const {
return ABIArgInfo::getDirect(llvm::IntegerType::get(getVMContext(), Size));
}
- if (Ty->isPromotableIntegerType())
+ // Bool type is always extended to the ABI, other builtin types are not
+ // extended.
+ const BuiltinType *BT = Ty->getAs<BuiltinType>();
+ if (BT && BT->getKind() == BuiltinType::Bool)
return ABIArgInfo::getExtend();
return ABIArgInfo::getDirect();
OpenPOWER on IntegriCloud