mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
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
This commit is contained in:
parent
41c09f4dbc
commit
c20f9163cb
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user