diff options
| author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-07-26 01:36:11 +0000 |
|---|---|---|
| committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-07-26 01:36:11 +0000 |
| commit | ea7fb0ce25acc04664a2e7c2b24af03cef2c0d1f (patch) | |
| tree | e337b527f1818d08701146c6be5a062e5bea3b27 /lib/CodeGen/TargetInfo.cpp | |
| parent | d46bedc75c78c1a07d381c8ee2f8c6b4ea77f749 (diff) | |
| download | clang-ea7fb0ce25acc04664a2e7c2b24af03cef2c0d1f.tar.gz clang-ea7fb0ce25acc04664a2e7c2b24af03cef2c0d1f.tar.bz2 clang-ea7fb0ce25acc04664a2e7c2b24af03cef2c0d1f.tar.xz | |
[PowerPC] Support powerpc64le as a syntax-checking target.
This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code. Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing. Code generation will otherwise be the same as
powerpc64 (big-endian), for now.
The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.
The new test case variant ensures that correct built-in defines for
little-endian code are generated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
| -rw-r--r-- | lib/CodeGen/TargetInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index 5934ff3719..3e7f7fedba 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -5416,6 +5416,9 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() { return *(TheTargetCodeGenInfo = new PPC64_SVR4_TargetCodeGenInfo(Types)); else return *(TheTargetCodeGenInfo = new PPC64TargetCodeGenInfo(Types)); + case llvm::Triple::ppc64le: + assert(Triple.isOSBinFormatELF() && "PPC64 LE non-ELF not supported!"); + return *(TheTargetCodeGenInfo = new PPC64_SVR4_TargetCodeGenInfo(Types)); case llvm::Triple::nvptx: case llvm::Triple::nvptx64: |
