diff options
| author | Will Schmidt <will_schmidt@vnet.ibm.com> | 2014-03-12 14:59:17 +0000 |
|---|---|---|
| committer | Will Schmidt <will_schmidt@vnet.ibm.com> | 2014-03-12 14:59:17 +0000 |
| commit | acae468c8e0c0e3d5d46409b5e0cb2718bdb98ef (patch) | |
| tree | 5dffc1ee9f9a7aea24b4c9c649dfb3ae8ce8ab00 /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | |
| parent | 22196e777c8f3753d1b71aa053aa038bea7ae16d (diff) | |
| download | bcm5719-llvm-acae468c8e0c0e3d5d46409b5e0cb2718bdb98ef.tar.gz bcm5719-llvm-acae468c8e0c0e3d5d46409b5e0cb2718bdb98ef.zip | |
Update the datalayout string for ppc64LE.
Update the datalayout string for ppc64LE.
llvm-svn: 203664
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index 46d2064a18d..36d2100ac51 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -37,8 +37,13 @@ extern "C" void LLVMInitializePowerPCTarget() { static std::string getDataLayoutString(const PPCSubtarget &ST) { const Triple &T = ST.getTargetTriple(); - // PPC is big endian. - std::string Ret = "E"; + std::string Ret; + + // Most PPC* platforms are big endian, PPC64LE is little endian. + if (ST.isLittleEndian()) + Ret = "e"; + else + Ret = "E"; Ret += DataLayout::getManglingComponent(T); |

