diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-11-05 17:16:08 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-11-05 17:16:08 +0000 |
commit | 7d712031e1cfcffc0fd21df1b4de7f08329245f1 (patch) | |
tree | a82f9d308cfcf40e982f0be93107cecd4f732380 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 24b2f6fddacb9393bc21332ae6b616f7ce8b220c (diff) | |
download | llvm-7d712031e1cfcffc0fd21df1b4de7f08329245f1.zip llvm-7d712031e1cfcffc0fd21df1b4de7f08329245f1.tar.gz llvm-7d712031e1cfcffc0fd21df1b4de7f08329245f1.tar.bz2 |
Convert FindFunctionInStream to return an error_code.
llvm-svn: 194084
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index f2039d4..3dd8f0b 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -3049,17 +3049,18 @@ OutOfRecordLoop: return error_code::success(); } -/// FindFunctionInStream - Find the function body in the bitcode stream -bool BitcodeReader::FindFunctionInStream(Function *F, +/// Find the function body in the bitcode stream +error_code BitcodeReader::FindFunctionInStream(Function *F, DenseMap<Function*, uint64_t>::iterator DeferredFunctionInfoIterator) { while (DeferredFunctionInfoIterator->second == 0) { if (Stream.AtEndOfStream()) return Error(CouldNotFindFunctionInStream); // ParseModule will parse the next body in the stream and set its // position in the DeferredFunctionInfo map. - if (ParseModule(true)) return true; + if (error_code EC = ParseModule(true)) + return EC; } - return false; + return error_code::success(); } //===----------------------------------------------------------------------===// |