aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Targets/X86.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Basic/Targets/X86.h')
-rw-r--r--clang/lib/Basic/Targets/X86.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h
index c952b8c9a336..d1b66432e38b 100644
--- a/clang/lib/Basic/Targets/X86.h
+++ b/clang/lib/Basic/Targets/X86.h
@@ -533,11 +533,12 @@ public:
DoubleAlign = LongLongAlign = 64;
bool IsWinCOFF =
getTriple().isOSWindows() && getTriple().isOSBinFormatCOFF();
- resetDataLayout(IsWinCOFF ? "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:"
- "64-i64:64-f80:32-n8:16:32-a:0:32-S32"
- : "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:"
- "64-i64:64-f80:32-n8:16:32-a:0:32-S32",
- IsWinCOFF ? "_" : "");
+ bool IsMSVC = getTriple().isWindowsMSVCEnvironment();
+ std::string Layout = IsWinCOFF ? "e-m:x" : "e-m:e";
+ Layout += "-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-";
+ Layout += IsMSVC ? "f80:128" : "f80:32";
+ Layout += "-n8:16:32-a:0:32-S32";
+ resetDataLayout(Layout, IsWinCOFF ? "_" : "");
}
};