forked from OSchip/llvm-project
Move NamedAttributeList::get() method out-of-line (fix CMake build due to missing include)
-- PiperOrigin-RevId: 251000296
This commit is contained in:
parent
8c4ae76b27
commit
05b0527ab7
|
@ -814,9 +814,7 @@ public:
|
|||
void setAttrs(ArrayRef<NamedAttribute> attributes);
|
||||
|
||||
/// Return the specified attribute if present, null otherwise.
|
||||
Attribute get(StringRef name) const {
|
||||
return attrs ? attrs.get(name) : nullptr;
|
||||
}
|
||||
Attribute get(StringRef name) const;
|
||||
Attribute get(Identifier name) const;
|
||||
|
||||
/// If the an attribute exists with the specified name, change it to the new
|
||||
|
|
|
@ -963,6 +963,11 @@ void NamedAttributeList::setAttrs(ArrayRef<NamedAttribute> attributes) {
|
|||
attrs = DictionaryAttr::get(attributes, attributes[0].second.getContext());
|
||||
}
|
||||
|
||||
/// Return the specified attribute if present, null otherwise.
|
||||
Attribute NamedAttributeList::get(StringRef name) const {
|
||||
return attrs ? attrs.get(name) : nullptr;
|
||||
}
|
||||
|
||||
/// Return the specified attribute if present, null otherwise.
|
||||
Attribute NamedAttributeList::get(Identifier name) const {
|
||||
return attrs ? attrs.get(name) : nullptr;
|
||||
|
|
Loading…
Reference in New Issue