mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-25 13:05:04 +00:00
[mlir] Use StringMap::lookup (NFC)
This commit is contained in:
parent
394eeb6e45
commit
51c9f12a52
@ -545,10 +545,7 @@ public:
|
||||
|
||||
/// Returns nullptr if the definition was not found.
|
||||
DynamicTypeDefinition *lookupTypeDefinition(StringRef name) const {
|
||||
auto it = nameToDynTypes.find(name);
|
||||
if (it == nameToDynTypes.end())
|
||||
return nullptr;
|
||||
return it->second;
|
||||
return nameToDynTypes.lookup(name);
|
||||
}
|
||||
|
||||
/// Returns nullptr if the definition was not found.
|
||||
@ -561,10 +558,7 @@ public:
|
||||
|
||||
/// Returns nullptr if the definition was not found.
|
||||
DynamicAttrDefinition *lookupAttrDefinition(StringRef name) const {
|
||||
auto it = nameToDynAttrs.find(name);
|
||||
if (it == nameToDynAttrs.end())
|
||||
return nullptr;
|
||||
return it->second;
|
||||
return nameToDynAttrs.lookup(name);
|
||||
}
|
||||
|
||||
/// Returns nullptr if the definition was not found.
|
||||
|
Loading…
x
Reference in New Issue
Block a user