aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorJan Voung <jvoung@chromium.org>2013-09-13 11:09:47 -0700
committerJan Voung <jvoung@chromium.org>2013-09-13 11:09:47 -0700
commit156e8330e6df89812148f8e1b22cd883391deedc (patch)
tree609efc84acfd9422d7645126800cf2b1e531569a /lib/Bitcode/Reader/BitcodeReader.cpp
parenta90e7c5042db33b4cc05625af4593e1a796533dc (diff)
Localize the le32 -> ARM hack to the LTO module for bitcode linking.
Only the bitcode linker via gold / lto module cares about le32 being a target w/ a real backend. LTOModule/LTOCodeGenerator is interested in having a real target to know the name mangling and assembly notation conventions (e.g., what's the prefix for private symbols). This removes the hack from the bitcode reader so that tools like llvm-dis are not affected and nonfinal pexes can still say that they are "le32". This is still not pretty, but it's better than polluting the BitcodeReader, especially if certain tools check what llvm-dis returns, and this doesn't require making a dummy backend just for name mangling and asm conventions. BUG=https://code.google.com/p/nativeclient/issues/detail?id=2554 TEST= trybots http://chromegw.corp.google.com/i/tryserver.nacl/builders/nacl-toolchain-linux-pnacl-x86_32/builds/826 http://chromegw.corp.google.com/i/tryserver.nacl/builders/nacl-toolchain-mac-pnacl-x86_32/builds/830 http://chromegw.corp.google.com/i/tryserver.nacl/builders/nacl-toolchain-linux-pnacl-x86_64/builds/876 R=dschuff@chromium.org Review URL: https://codereview.chromium.org/23619038
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index a7434938b4..c48965cf93 100644
--- a/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1610,14 +1610,6 @@ bool BitcodeReader::ParseModule(bool Resume) {
std::string S;
if (ConvertToString(Record, 0, S))
return Error("Invalid MODULE_CODE_TRIPLE record");
-
- // @LOCALMOD-BEGIN
- // This hack is needed in order to get Clang compiled binaries
- // working with the Gold plugin, until PNaCl backend is introduced
- // in lib/Target/PNaCl.
- if (S == "le32-unknown-nacl")
- S = "armv7-none-linux-gnueabi";
- // @LOCALMOD-END
TheModule->setTargetTriple(S);
break;
}