[mlir] Fix build on gcc-5 after D104167

This commit is contained in:
River Riddle 2021-06-22 21:15:17 +00:00
parent b259740801
commit 6000749804
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ def AOp : NS_Op<"a_op", []> {
// DECL: static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
// DECL-NEXT: static ::llvm::StringRef attrNames[] =
// DECL-SAME: {::llvm::StringRef("aAttr"), ::llvm::StringRef("bAttr"), ::llvm::StringRef("cAttr")};
// DECL-NEXT: return attrNames;
// DECL-NEXT: return ::llvm::makeArrayRef(attrNames);
// DECL: ::mlir::Identifier aAttrAttrName()
// DECL-NEXT: return getAttributeNameForIndex(0);

View File

@ -666,7 +666,7 @@ void OpEmitter::genAttrNameGetters() {
body << "::llvm::StringRef(\"" << attrName
<< "\")";
});
body << "};\n return attrNames;";
body << "};\n return ::llvm::makeArrayRef(attrNames);";
}
}