From: Reid Kleckner Date: Fri, 11 Oct 2013 21:10:11 +0000 (+0000) Subject: Only use the MS record layout when using the MS C++ ABI X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=812a32f41efc1cea52ee93220ba1519758807ad6;p=clang Only use the MS record layout when using the MS C++ ABI We're not ready to use it everywhere we use a win32 triple yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192502 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index 575ef31604..10c7b5d88f 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -2345,11 +2345,11 @@ static bool mustSkipTailPadding(TargetCXXABI ABI, const CXXRecordDecl *RD) { } static bool isMsLayout(const RecordDecl* D) { - return (D->getASTContext().getTargetInfo().getCXXABI().isMicrosoft() || - D->getASTContext().getTargetInfo().getTriple().getOS() == - llvm::Triple::Win32) && - D->getASTContext().getTargetInfo().getPointerWidth(0) == 32; - // FIXME: we intend to enable 64 bit mode once it's been verified. + // FIXME: Use MS record layout for x64 code and remove MS C++ support from the + // Itanium record layout code. + return D->getASTContext().getTargetInfo().getCXXABI().isMicrosoft() && + D->getASTContext().getTargetInfo().getTriple().getArch() == + llvm::Triple::x86; } // This section contains an implementation of struct layout that is, up to the