We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24892b8 commit 2a4c484Copy full SHA for 2a4c484
llvm/lib/Support/VirtualFileSystem.cpp
@@ -1708,11 +1708,12 @@ class llvm::vfs::RedirectingFileSystemParser {
1708
// false on error
1709
bool checkDuplicateOrUnknownKey(yaml::Node *KeyNode, StringRef Key,
1710
DenseMap<StringRef, KeyStatus> &Keys) {
1711
- if (!Keys.count(Key)) {
+ auto It = Keys.find(Key);
1712
+ if (It == Keys.end()) {
1713
error(KeyNode, "unknown key");
1714
return false;
1715
}
- KeyStatus &S = Keys[Key];
1716
+ KeyStatus &S = It->second;
1717
if (S.Seen) {
1718
error(KeyNode, Twine("duplicate key '") + Key + "'");
1719
0 commit comments