diff options
Diffstat (limited to 'clang/lib/Basic/TargetInfo.cpp')
| -rw-r--r-- | clang/lib/Basic/TargetInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp index e3a2f30febe7..188ffb5f2f78 100644 --- a/clang/lib/Basic/TargetInfo.cpp +++ b/clang/lib/Basic/TargetInfo.cpp @@ -69,11 +69,11 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : Triple(T) { // From the glibc documentation, on GNU systems, malloc guarantees 16-byte // alignment on 64-bit systems and 8-byte alignment on 32-bit systems. See // https://www.gnu.org/software/libc/manual/html_node/Malloc-Examples.html. - // This alignment guarantee also applies to Windows and Android. On Darwin, - // the alignment is 16 bytes on both 64-bit and 32-bit systems. + // This alignment guarantee also applies to Windows and Android. On Darwin + // and OpenBSD, the alignment is 16 bytes on both 64-bit and 32-bit systems. if (T.isGNUEnvironment() || T.isWindowsMSVCEnvironment() || T.isAndroid()) NewAlign = Triple.isArch64Bit() ? 128 : Triple.isArch32Bit() ? 64 : 0; - else if (T.isOSDarwin()) + else if (T.isOSDarwin() || T.isOSOpenBSD()) NewAlign = 128; else NewAlign = 0; // Infer from basic type alignment. |
