mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
[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
This commit is contained in:
parent
ab11289986
commit
dfd425a3de
@ -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".
|
||||
|
Loading…
Reference in New Issue
Block a user