diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-07-04 20:05:56 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-07-04 20:05:56 +0000 |
commit | e6107799fabd0df72690ff276cfeb1d7559c40e4 (patch) | |
tree | 068c1486ffb3c4a5a314e7af78101eda6806fa35 | |
parent | c75c4fad469022949df46faf22dbc3aad6d1624c (diff) | |
download | bcm5719-llvm-e6107799fabd0df72690ff276cfeb1d7559c40e4.tar.gz bcm5719-llvm-e6107799fabd0df72690ff276cfeb1d7559c40e4.zip |
Fix a bug in the conversion to ErrorOr.
The regular end of the bitcode parsing is in the BitstreamEntry::EndBlock
case.
Should fix the LTO bootstrap on OS X (this function is only used by ld64).
llvm-svn: 212357
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index c02b587e3fc..192f7538da8 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -2132,7 +2132,7 @@ ErrorOr<std::string> BitcodeReader::parseModuleTriple() { case BitstreamEntry::Error: return Error(MalformedBlock); case BitstreamEntry::EndBlock: - return std::error_code(); + return Triple; case BitstreamEntry::Record: // The interesting case. break; @@ -2151,7 +2151,7 @@ ErrorOr<std::string> BitcodeReader::parseModuleTriple() { } Record.clear(); } - return Triple; + llvm_unreachable("Exit infinite loop"); } ErrorOr<std::string> BitcodeReader::parseTriple() { |