trivial cleanup, NFC.

This commit is contained in:
Chris Lattner 2020-04-13 08:52:17 -07:00
parent a732532fcf
commit d9f26e81d7
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ static StringAttr getModuleFIRRTLNameAttr(ArrayRef<NamedAttribute> attrs) {
// FIXME: We currently use firrtl.name instead of name because this makes
// the FunctionLike handling in MLIR core happier. It otherwise doesn't
// allow attributes on module parameters.
if (!argAttr.first.is("firrtl.name"))
if (argAttr.first != "firrtl.name")
continue;
return argAttr.second.dyn_cast<StringAttr>();
@ -510,7 +510,7 @@ void ConstantOp::build(Builder *builder, OperationState &result,
FIRRTLType SubfieldOp::getResultType(FIRRTLType inType, StringRef fieldName) {
if (auto bundleType = inType.dyn_cast<BundleType>()) {
for (auto &elt : bundleType.getElements()) {
if (elt.first.is(fieldName))
if (elt.first == fieldName)
return elt.second;
}
}