forked from OSchip/llvm-project
[clangd] Simplify relations deserialization loop, NFC.
This commit is contained in:
parent
3225fcf11e
commit
6484aa1add
|
@ -508,10 +508,8 @@ llvm::Expected<IndexFileIn> readRIFF(llvm::StringRef Data) {
|
|||
if (Chunks.count("rela")) {
|
||||
Reader RelationsReader(Chunks.lookup("rela"));
|
||||
RelationSlab::Builder Relations;
|
||||
while (!RelationsReader.eof()) {
|
||||
auto Relation = readRelation(RelationsReader);
|
||||
Relations.insert(Relation);
|
||||
}
|
||||
while (!RelationsReader.eof())
|
||||
Relations.insert(readRelation(RelationsReader));
|
||||
if (RelationsReader.err())
|
||||
return error("malformed or truncated relations");
|
||||
Result.Relations = std::move(Relations).build();
|
||||
|
|
Loading…
Reference in New Issue