long double is double on OpenBSD/NetBSD/PPC.

Patch by George Koehler.

llvm-svn: 353656
This commit is contained in:
Brad Smith 2019-02-11 02:53:16 +00:00
parent f6e6c369c0
commit 09699a7603
2 changed files with 9 additions and 1 deletions

View File

@ -330,9 +330,15 @@ public:
break;
}
if (getTriple().isOSFreeBSD()) {
switch (getTriple().getOS()) {
case llvm::Triple::FreeBSD:
case llvm::Triple::NetBSD:
case llvm::Triple::OpenBSD:
LongDoubleWidth = LongDoubleAlign = 64;
LongDoubleFormat = &llvm::APFloat::IEEEdouble();
break;
default:
break;
}
// PPC32 supports atomics up to 4 bytes.

View File

@ -1,4 +1,6 @@
// RUN: %clang_cc1 -triple powerpc-unknown-freebsd -emit-llvm -o - %s| FileCheck -check-prefix=SVR4-CHECK %s
// RUN: %clang_cc1 -triple powerpc-unknown-netbsd -emit-llvm -o - %s| FileCheck -check-prefix=SVR4-CHECK %s
// RUN: %clang_cc1 -triple powerpc-unknown-openbsd -emit-llvm -o - %s| FileCheck -check-prefix=SVR4-CHECK %s
#include <stdarg.h>