Selaa lähdekoodia

[PPC64] Fix PPC64TargetInfo ABI on clang side after D61950

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361365 91177308-0d34-0410-b5e6-96231b3b80d8
Fangrui Song 6 vuotta sitten
vanhempi
commit
cba882bd58
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      lib/Basic/Targets/PPC.h

+ 2 - 1
lib/Basic/Targets/PPC.h

@@ -379,10 +379,11 @@ public:
 
 
     if ((Triple.getArch() == llvm::Triple::ppc64le)) {
     if ((Triple.getArch() == llvm::Triple::ppc64le)) {
       resetDataLayout("e-m:e-i64:64-n32:64");
       resetDataLayout("e-m:e-i64:64-n32:64");
+      ABI = "elfv2";
     } else {
     } else {
       resetDataLayout("E-m:e-i64:64-n32:64");
       resetDataLayout("E-m:e-i64:64-n32:64");
+      ABI = Triple.getEnvironment() == llvm::Triple::ELFv2 ? "elfv2" : "elfv1";
     }
     }
-    ABI = Triple.getEnvironment() == llvm::Triple::ELFv1 ? "elfv1" : "elfv2";
 
 
     switch (Triple.getOS()) {
     switch (Triple.getOS()) {
     case llvm::Triple::FreeBSD:
     case llvm::Triple::FreeBSD: