summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2016-01-23 16:02:10 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2016-01-23 16:02:10 +0000
commit1235d280d82e5fb0eb7033b4a2eafc8b7b52ceb0 (patch)
tree222ce68392be2aacc367f38e8972f2adb27a9c77
parentadd830b5d10c5ef0ae1f5131389103c385ea5127 (diff)
downloadbcm5719-llvm-1235d280d82e5fb0eb7033b4a2eafc8b7b52ceb0.tar.gz
bcm5719-llvm-1235d280d82e5fb0eb7033b4a2eafc8b7b52ceb0.zip
[Bitcode] Insert the darwin wrapper at the beginning of a file when the
target is macho. It looks like the check for macho was accidentally dropped in r132959. I don't have a test case, but I'll add one if anyone knows how this can be tested. llvm-svn: 258627
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 5760a643e21..c3a7411353b 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -3045,7 +3045,7 @@ void llvm::WriteBitcodeToFile(const Module *M, raw_ostream &Out,
// If this is darwin or another generic macho target, reserve space for the
// header.
Triple TT(M->getTargetTriple());
- if (TT.isOSDarwin())
+ if (TT.isOSDarwin() || TT.isOSBinFormatMachO())
Buffer.insert(Buffer.begin(), DarwinBCHeaderSize, 0);
// Emit the module into the buffer.
@@ -3067,7 +3067,7 @@ void llvm::WriteBitcodeToFile(const Module *M, raw_ostream &Out,
EmitFunctionSummary);
}
- if (TT.isOSDarwin())
+ if (TT.isOSDarwin() || TT.isOSBinFormatMachO())
EmitDarwinBCHeaderAndTrailer(Buffer, TT);
// Write the generated bitstream to "Out".
OpenPOWER on IntegriCloud