forked from OSchip/llvm-project
Prevent unused error when assertions are disabled.
This commit is contained in:
parent
76e0e1a55d
commit
1a30eab413
|
@ -80,8 +80,10 @@ private:
|
|||
// It should emit diagnostics if the value is invalid (e.g. wrong type).
|
||||
// If Key is seen twice, Parse runs only once and an error is reported.
|
||||
void handle(llvm::StringLiteral Key, std::function<bool(Node &)> Parse) {
|
||||
for (const auto &Entry : Keys)
|
||||
for (const auto &Entry : Keys) {
|
||||
(void) Entry;
|
||||
assert(Entry.first != Key && "duplicate key handler");
|
||||
}
|
||||
Keys.emplace_back(Key, std::move(Parse));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue