diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-17 15:29:48 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-12-17 15:29:48 +0000 |
commit | ce6d31427fa8478917bbd9c57bf1968908c87b94 (patch) | |
tree | 6f05067f4ef58b07f2a7317a6c8f84ddb8ba330f /lib | |
parent | fcd2633a26406cbbf3db53fb1ce3cae7cf1cb57b (diff) | |
download | llvm-ce6d31427fa8478917bbd9c57bf1968908c87b94.tar.gz llvm-ce6d31427fa8478917bbd9c57bf1968908c87b94.tar.bz2 llvm-ce6d31427fa8478917bbd9c57bf1968908c87b94.tar.xz |
Fix the pointer size for the PS3 datalayout.
This will be tested from clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 17799cb829..3d8fa1c195 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -35,11 +35,14 @@ extern "C" void LLVMInitializePowerPCTarget() { /// Return the datalayout string of a subtarget. static std::string getDataLayoutString(const PPCSubtarget &ST) { + const Triple &T = ST.getTargetTriple(); + // PPC is big endian. std::string Ret = "E"; - // PPC32 has 32 bit pointers. - if (!ST.isPPC64()) + // PPC32 has 32 bit pointers. The PS3 (OS Lv2) is a PPC64 machine with 32 bit + // pointers. + if (!ST.isPPC64() || T.getOS() == Triple::Lv2) Ret += "-p:32:32"; // Note, the alignment values for f64 and i64 on ppc64 in Darwin |