[PATCH] D93919: [PowerPC] Support powerpcle target in Clang [3/5]

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 29 19:31:15 PST 2020


MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/test/Driver/ppc-endian.c:1
-// RUN: %clang -target powerpc64le -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE %s
-// RUN: %clang -target powerpc64le -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE %s
-// RUN: %clang -target powerpc64 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-LE %s
-// CHECK-LE: "-cc1"{{.*}} "-triple" "powerpc64le{{.*}}"
+// RUN: %clang -target powerpc-unknown -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE32 %s
+// RUN: %clang -target powerpc-unknown -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE32 %s
----------------
Bdragon28 wrote:
> MaskRay wrote:
> > "-unknown" is correct, though I usually omit it as it is not useful...
> This is actually intentional!
> 
> I needed to force it to emit the hyphen so I could tell powerpc apart from powerpcle. The same for powerpc64, the BE test was actually not working properly as is because it would also match on LE.
You can write `"-triple" "powerpcle"` ..

I think the driver side works even without TargetInfo change


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93919/new/

https://reviews.llvm.org/D93919



More information about the cfe-commits mailing list