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 199
199
// RUN: %clang_cc1 -E -dM -triple=armv7-apple-ios7.0 -x c++ < /dev/null | FileCheck -match-full-lines -check-prefix ARM-DARWIN-CXX %s
200
200
// ARM-DARWIN-CXX: #define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16UL
201
201
202
+ // RUN: %clang_cc1 -E -dM -triple=arm-unknown-openbsd -x c++ < /dev/null | FileCheck -match-full-lines -check-prefix ARM-OPENBSD-CXX %s
203
+ // ARM-OPENBSD-CXX: #define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16UL
204
+
202
205
// 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
203
206
// ARM-APCS-GNU: #define __INTPTR_TYPE__ int
204
207
// ARM-APCS-GNU: #define __PTRDIFF_TYPE__ int
Original file line number Diff line number Diff line change 1176
1176
// PPC-DARWIN:#define __WINT_WIDTH__ 32
1177
1177
// PPC-DARWIN:#define __powerpc__ 1
1178
1178
// PPC-DARWIN:#define __ppc__ 1
1179
+
1180
+ // RUN: %clang_cc1 -E -dM -triple=powerpc-unknown-openbsd -x c++ < /dev/null | FileCheck -match-full-lines -check-prefix PPC-OPENBSD-CXX %s
1181
+ // PPC-OPENBSD-CXX: #define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16UL
Original file line number Diff line number Diff line change 1732
1732
// X86_64-NETBSD:#define __amd64__ 1
1733
1733
// X86_64-NETBSD:#define __x86_64 1
1734
1734
// X86_64-NETBSD:#define __x86_64__ 1
1735
+
1736
+ // RUN: %clang_cc1 -E -dM -triple=i386-unknown-openbsd -x c++ < /dev/null | FileCheck -match-full-lines -check-prefix I386-OPENBSD-CXX %s
1737
+ // I386-OPENBSD-CXX: #define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16UL
You can’t perform that action at this time.
0 commit comments