mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-21 19:36:59 +00:00
Fix LTO builds with xcode 4.
llvm-svn: 132132
This commit is contained in:
parent
5bfbea9ef2
commit
0395db684a
@ -1588,8 +1588,18 @@ bool BitcodeReader::ParseBitcodeInto(Module *M) {
|
||||
while (!Stream.AtEndOfStream()) {
|
||||
unsigned Code = Stream.ReadCode();
|
||||
|
||||
if (Code != bitc::ENTER_SUBBLOCK)
|
||||
if (Code != bitc::ENTER_SUBBLOCK) {
|
||||
|
||||
// The ranlib in xcode 4 will align archive members by appending newlines to the
|
||||
// end of them. If this file size is a multiple of 4 but not 8, we have to read and
|
||||
// ignore these final 4 bytes :-(
|
||||
if (Stream.GetAbbrevIDWidth() == 2 && Code == 2 &&
|
||||
Stream.Read(6) == 2 && Stream.Read(24) == 0xa0a0a &&
|
||||
Stream.AtEndOfStream())
|
||||
return false;
|
||||
|
||||
return Error("Invalid record at top-level");
|
||||
}
|
||||
|
||||
unsigned BlockID = Stream.ReadSubBlockID();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user