From 10dcff81be7c03ccf254f6334815c754c6ae4121 Mon Sep 17 00:00:00 2001 From: Julien Lerouge Date: Wed, 27 Aug 2014 00:36:55 +0000 Subject: 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 --- clang/lib/CodeGen/TargetInfo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen') 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(); + if (BT && BT->getKind() == BuiltinType::Bool) return ABIArgInfo::getExtend(); return ABIArgInfo::getDirect(); -- cgit v1.2.3