aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-06-23 18:48:56 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-06-23 18:48:56 -0700
commitae9f7fcc65aed800db82aaa55e5e72322f20af02 (patch)
treeeca0b1eeffb65890a1cefdfc203cb4f82afde025 /lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
parent7001e7af4b74a6a5f5ddc445975d657d443ef2cd (diff)
PNaCl wire format: Remove the top-level TRIPLE record
Currently, the triple that gets put into pexes is "armv7-none-linux-gnueabi". This is a wart that we don't want to keep. We can remove the triple entirely; PNaCl doesn't need it. We don't need to add a triple back at read time: (pnacl-)llc tells the backend explicitly what target to use. I'm leaving MODULE_CODE_TRIPLE defined in the enum for now because pnacl-bcanalyzer still refers to it. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3505 TEST=PNaCl toolchain trybots + GCC torture tests + Spec2k Review URL: https://codereview.chromium.org/17321009
Diffstat (limited to 'lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp')
-rw-r--r--lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp b/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
index 3fa90f88a0..82d6198fa6 100644
--- a/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
+++ b/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
@@ -16,7 +16,6 @@
#include "llvm/Bitcode/NaCl/NaClBitcodeHeader.h"
#include "llvm/Bitcode/NaCl/NaClReaderWriter.h"
#include "NaClValueEnumerator.h"
-#include "llvm/ADT/Triple.h"
#include "llvm/Bitcode/NaCl/NaClBitstreamWriter.h"
#include "llvm/Bitcode/NaCl/NaClLLVMBitCodes.h"
#include "llvm/IR/Constants.h"
@@ -425,15 +424,12 @@ static unsigned getEncodedThreadLocalMode(const GlobalVariable *GV) {
llvm_unreachable("Invalid TLS model");
}
-// Emit top-level description of module, including target triple, inline asm,
+// Emit top-level description of module, including inline asm,
// descriptors for global variables, and function prototype info.
static void WriteModuleInfo(const Module *M, const NaClValueEnumerator &VE,
NaClBitstreamWriter &Stream) {
DEBUG(dbgs() << "-> WriteModuleInfo\n");
// Emit various pieces of data attached to a module.
- if (!M->getTargetTriple().empty())
- WriteStringRecord(naclbitc::MODULE_CODE_TRIPLE, M->getTargetTriple(),
- 0/*TODO*/, Stream);
if (!M->getDataLayout().empty())
WriteStringRecord(naclbitc::MODULE_CODE_DATALAYOUT, M->getDataLayout(),
0/*TODO*/, Stream);
@@ -1780,7 +1776,7 @@ static void WriteModule(const Module *M, NaClBitstreamWriter &Stream) {
// Emit information describing all of the types in the module.
WriteTypeTable(VE, Stream);
- // Emit top-level description of module, including target triple, inline asm,
+ // Emit top-level description of module, including inline asm,
// descriptors for global variables, and function prototype info.
WriteModuleInfo(M, VE, Stream);