diff --git a/lib/Target/X86/X86Subtarget.h b/lib/Target/X86/X86Subtarget.h index 49af986c4b1..1b76d76c7a2 100644 --- a/lib/Target/X86/X86Subtarget.h +++ b/lib/Target/X86/X86Subtarget.h @@ -145,12 +145,18 @@ public: std::string getDataLayout() const { const char *p; - if (is64Bit()) - p = "e-p:64:64-f64:32:64-i64:32:64-f80:128:128"; - else if (isTargetDarwin()) - p = "e-p:32:32-f64:32:64-i64:32:64-f80:128:128"; - else - p = "e-p:32:32-f64:32:64-i64:32:64-f80:32:32"; + if (is64Bit()) { + if (isTargetDarwin()) + p = "e-p:64:64-f64:32:64-i64:32:64-f80:128:128"; + else + p = "e-p:64:64-f64:64:64-i64:64:64-f80:128:128"; + } + else { + if (isTargetDarwin()) + p = "e-p:32:32-f64:32:64-i64:32:64-f80:128:128"; + else + p = "e-p:32:32-f64:32:64-i64:32:64-f80:32:32"; + } return std::string(p); }