aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-06-08 19:08:36 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-06-08 19:08:36 +0000
commit4acde1d4dc401976e264cb1ae159a6824d074938 (patch)
tree287f0588c2ed1bd083812ccfd54916c4438dc2bd /llvm/lib/Target/X86/X86TargetMachine.cpp
parent8ef8b7373e822d66336d50c7a0a6078aa59e8acd (diff)
downloadllvm-4acde1d4dc401976e264cb1ae159a6824d074938.zip
llvm-4acde1d4dc401976e264cb1ae159a6824d074938.tar.gz
llvm-4acde1d4dc401976e264cb1ae159a6824d074938.tar.bz2
X86: simplify data layout calculation
X86Subtarget::isTargetCygMing || X86Subtarget::isTargetKnownWindowsMSVC is equivalent to all Windows environments. Simplify the check to isOSWindows. NFC. llvm-svn: 210431
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 59b8cba..f011619 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -39,8 +39,7 @@ static std::string computeDataLayout(const X86Subtarget &ST) {
Ret += "-p:32:32";
// Some ABIs align 64 bit integers and doubles to 64 bits, others to 32.
- if (ST.is64Bit() || ST.isTargetCygMing() || ST.isTargetKnownWindowsMSVC() ||
- ST.isTargetNaCl())
+ if (ST.is64Bit() || ST.isOSWindows() || ST.isTargetNaCl())
Ret += "-i64:64";
else
Ret += "-f64:32:64";
@@ -60,7 +59,7 @@ static std::string computeDataLayout(const X86Subtarget &ST) {
Ret += "-n8:16:32";
// The stack is aligned to 32 bits on some ABIs and 128 bits on others.
- if (!ST.is64Bit() && (ST.isTargetCygMing() || ST.isTargetKnownWindowsMSVC()))
+ if (!ST.is64Bit() && ST.isOSWindows())
Ret += "-S32";
else
Ret += "-S128";