diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-03 19:21:54 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-03 19:21:54 +0000 |
commit | 58873566b3718a6b2730e7d726491398766a39a4 (patch) | |
tree | 95885e037ec4064b92202d0a8d15fb4d803b4c8a /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | |
parent | e891c5f2648c85a31c57c2cc63f76a5b95da86d3 (diff) | |
download | llvm-58873566b3718a6b2730e7d726491398766a39a4.zip llvm-58873566b3718a6b2730e7d726491398766a39a4.tar.gz llvm-58873566b3718a6b2730e7d726491398766a39a4.tar.bz2 |
Make the llvm mangler depend only on DataLayout.
Before this patch any program that wanted to know the final symbol name of a
GlobalValue had to link with Target.
This patch implements a compromise solution where the mangler uses DataLayout.
This way, any tool that already links with Target (llc, clang) gets the exact
behavior as before and new IR files can be mangled without linking with Target.
With this patch the mangler is constructed with just a DataLayout and DataLayout
is extended to include the information the Mangler needs.
llvm-svn: 198438
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index ca969c0..2e8d2d6 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -40,6 +40,8 @@ static std::string getDataLayoutString(const PPCSubtarget &ST) { // PPC is big endian. std::string Ret = "E"; + Ret += DataLayout::getManglingComponent(T); + // PPC32 has 32 bit pointers. The PS3 (OS Lv2) is a PPC64 machine with 32 bit // pointers. if (!ST.isPPC64() || T.getOS() == Triple::Lv2) |