r192502 - Only use the MS record layout when using the MS C++ ABI
Reid Kleckner
reid at kleckner.net
Fri Oct 11 14:10:12 PDT 2013
Author: rnk
Date: Fri Oct 11 16:10:11 2013
New Revision: 192502
URL: http://llvm.org/viewvc/llvm-project?rev=192502&view=rev
Log:
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.
Modified:
cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
Modified: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?rev=192502&r1=192501&r2=192502&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Fri Oct 11 16:10:11 2013
@@ -2345,11 +2345,11 @@ static bool mustSkipTailPadding(TargetCX
}
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
More information about the cfe-commits
mailing list