forked from OSchip/llvm-project
Set ABI and DescriptionString first to reduce OS specific logic.
Use switch for FreeBSD check to allow easier extension. llvm-svn: 219838
This commit is contained in:
parent
2ceaeb6baf
commit
3f1a935548
|
@ -1288,18 +1288,21 @@ public:
|
|||
IntMaxType = SignedLong;
|
||||
Int64Type = SignedLong;
|
||||
|
||||
if (getTriple().getOS() == llvm::Triple::FreeBSD) {
|
||||
if ((Triple.getArch() == llvm::Triple::ppc64le)) {
|
||||
DescriptionString = "e-m:e-i64:64-n32:64";
|
||||
ABI = "elfv2";
|
||||
} else {
|
||||
DescriptionString = "E-m:e-i64:64-n32:64";
|
||||
ABI = "elfv1";
|
||||
}
|
||||
|
||||
switch (getTriple().getOS()) {
|
||||
case llvm::Triple::FreeBSD:
|
||||
LongDoubleWidth = LongDoubleAlign = 64;
|
||||
LongDoubleFormat = &llvm::APFloat::IEEEdouble;
|
||||
DescriptionString = "E-m:e-i64:64-n32:64";
|
||||
} else {
|
||||
if ((Triple.getArch() == llvm::Triple::ppc64le)) {
|
||||
DescriptionString = "e-m:e-i64:64-n32:64";
|
||||
ABI = "elfv2";
|
||||
} else {
|
||||
DescriptionString = "E-m:e-i64:64-n32:64";
|
||||
ABI = "elfv1";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// PPC64 supports atomics up to 8 bytes.
|
||||
|
|
Loading…
Reference in New Issue