diff options
author | Teresa Johnson <tejohnson@google.com> | 2015-11-21 03:51:23 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2015-11-21 03:51:23 +0000 |
commit | 16e2a9eeb61fa19bd895a17474f846026bfe12cd (patch) | |
tree | faaf170bf0729d254fc68532f69472dcb1e86a3f /llvm/lib/Bitcode | |
parent | b569368a5a69fa00196e1bf6fffbe125be368a49 (diff) | |
download | bcm5719-llvm-16e2a9eeb61fa19bd895a17474f846026bfe12cd.tar.gz bcm5719-llvm-16e2a9eeb61fa19bd895a17474f846026bfe12cd.zip |
Move new assert to correct location
This assert was meant to execute at the end of parseMetadata, but
we return early and never reach the end of the function. Caught
by a compile-time warning since the function doesn't return a value
from that location.
llvm-svn: 253762
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index f2b0a0fd678..9d907773cb3 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1967,6 +1967,9 @@ std::error_code BitcodeReader::parseMetadata(bool ModuleLevel) { return error("Malformed block"); case BitstreamEntry::EndBlock: MDValueList.tryToResolveCycles(); + assert((!(ModuleLevel && SeenModuleValuesRecord) || + NumModuleMDs == MDValueList.size()) && + "Inconsistent bitcode: METADATA_VALUES mismatch"); return std::error_code(); case BitstreamEntry::Record: // The interesting case. @@ -2396,9 +2399,6 @@ std::error_code BitcodeReader::parseMetadata(bool ModuleLevel) { } } } - assert((!(ModuleLevel && SeenModuleValuesRecord) || - NumModuleMDs == MDValueList.size()) && - "Inconsistent bitcode: METADATA_VALUES mismatch"); #undef GET_OR_DISTINCT } |