File tree Expand file tree Collapse file tree 4 files changed +12
-3
lines changed Expand file tree Collapse file tree 4 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -69,11 +69,11 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : Triple(T) {
69
69
// From the glibc documentation, on GNU systems, malloc guarantees 16-byte
70
70
// alignment on 64-bit systems and 8-byte alignment on 32-bit systems. See
71
71
// https://www.gnu.org/software/libc/manual/html_node/Malloc-Examples.html.
72
- // This alignment guarantee also applies to Windows and Android. On Darwin,
73
- // the alignment is 16 bytes on both 64-bit and 32-bit systems.
72
+ // This alignment guarantee also applies to Windows and Android. On Darwin
73
+ // and OpenBSD, the alignment is 16 bytes on both 64-bit and 32-bit systems.
74
74
if (T.isGNUEnvironment () || T.isWindowsMSVCEnvironment () || T.isAndroid ())
75
75
NewAlign = Triple.isArch64Bit () ? 128 : Triple.isArch32Bit () ? 64 : 0 ;
76
- else if (T.isOSDarwin ())
76
+ else if (T.isOSDarwin () || T. isOSOpenBSD () )
77
77
NewAlign = 128 ;
78
78
else
79
79
NewAlign = 0 ; // Infer from basic type alignment.
Original file line number Diff line number Diff line change 198
198
// RUN: %clang_cc1 -E -dM -triple=armv7-apple-ios7.0 -x c++ < /dev/null | FileCheck -match-full-lines -check-prefix ARM-DARWIN-CXX %s
199
199
// ARM-DARWIN-CXX: #define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16UL
200
200
201
+ // RUN: %clang_cc1 -E -dM -triple=arm-unknown-openbsd -x c++ < /dev/null | FileCheck -match-full-lines -check-prefix ARM-OPENBSD-CXX %s
202
+ // ARM-OPENBSD-CXX: #define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16UL
203
+
201
204
// RUN: %clang_cc1 -dM -ffreestanding -triple arm-none-none -target-abi apcs-gnu -E /dev/null -o - | FileCheck -match-full-lines -check-prefix ARM-APCS-GNU %s
202
205
// ARM-APCS-GNU: #define __INTPTR_TYPE__ int
203
206
// ARM-APCS-GNU: #define __PTRDIFF_TYPE__ int
Original file line number Diff line number Diff line change 1171
1171
// PPC-DARWIN:#define __WINT_WIDTH__ 32
1172
1172
// PPC-DARWIN:#define __powerpc__ 1
1173
1173
// PPC-DARWIN:#define __ppc__ 1
1174
+
1175
+ // RUN: %clang_cc1 -E -dM -triple=powerpc-unknown-openbsd -x c++ < /dev/null | FileCheck -match-full-lines -check-prefix PPC-OPENBSD-CXX %s
1176
+ // PPC-OPENBSD-CXX: #define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16UL
Original file line number Diff line number Diff line change 1717
1717
// X86_64-NETBSD:#define __amd64__ 1
1718
1718
// X86_64-NETBSD:#define __x86_64 1
1719
1719
// X86_64-NETBSD:#define __x86_64__ 1
1720
+
1721
+ // RUN: %clang_cc1 -E -dM -triple=i386-unknown-openbsd -x c++ < /dev/null | FileCheck -match-full-lines -check-prefix I386-OPENBSD-CXX %s
1722
+ // I386-OPENBSD-CXX: #define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16UL
You can’t perform that action at this time.
0 commit comments