From: Will Schmidt Date: Wed, 12 Mar 2014 14:59:17 +0000 (+0000) Subject: Update the datalayout string for ppc64LE. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=3d37204ca6514d5d1e2c43fbf85dfeba08c83175;p=oota-llvm.git Update the datalayout string for ppc64LE. Update the datalayout string for ppc64LE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203664 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 46d2064a18d..36d2100ac51 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/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);