Skip to content

Commit 46d90a1

Browse files
author
git apple-llvm automerger
committed
Merge commit 'a4fc6c2aebeb' from apple/stable/20200714 into swift/master-rebranch
2 parents e5aa6c6 + a4fc6c2 commit 46d90a1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

clang/lib/Basic/Targets/X86.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,10 @@ class LLVM_LIBRARY_VISIBILITY X86_32TargetInfo : public X86TargetInfo {
358358
LongDoubleWidth = 96;
359359
LongDoubleAlign = 32;
360360
SuitableAlign = 128;
361-
resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-"
361+
resetDataLayout(Triple.isOSBinFormatMachO() ?
362+
"e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-"
363+
"f80:32-n8:16:32-S128" :
364+
"e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-"
362365
"f80:32-n8:16:32-S128");
363366
SizeType = UnsignedInt;
364367
PtrDiffType = SignedInt;

clang/test/CodeGen/target-data.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
// RUN: FileCheck --check-prefix=I686-CYGWIN %s
1515
// I686-CYGWIN: target datalayout = "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"
1616

17+
// RUN: %clang_cc1 -triple i686-pc-macho -emit-llvm -o - %s | \
18+
// RUN: FileCheck --check-prefix=I686-MACHO %s
19+
// I686-MACHO: target datalayout = "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128"
20+
1721
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | \
1822
// RUN: FileCheck --check-prefix=X86_64 %s
1923
// X86_64: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"

0 commit comments

Comments
 (0)