]> granicus.if.org Git - clang/commitdiff
[PPC64] Fix PPC64TargetInfo ABI on clang side after D61950
authorFangrui Song <maskray@google.com>
Wed, 22 May 2019 09:26:46 +0000 (09:26 +0000)
committerFangrui Song <maskray@google.com>
Wed, 22 May 2019 09:26:46 +0000 (09:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361365 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets/PPC.h

index 88dbcc03d11394d42ea223d28eff1b55b3f8f2d3..465a7cf422138283cfdda5913485041595c50314 100644 (file)
@@ -379,10 +379,11 @@ public:
 
     if ((Triple.getArch() == llvm::Triple::ppc64le)) {
       resetDataLayout("e-m:e-i64:64-n32:64");
+      ABI = "elfv2";
     } else {
       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()) {
     case llvm::Triple::FreeBSD: