[flang][mlir] Fix FIR after D108899
authorJean Perier <jperier@nvidia.com>
Mon, 30 Aug 2021 11:46:04 +0000 (04:46 -0700)
committerJean Perier <jperier@nvidia.com>
Mon, 30 Aug 2021 11:51:39 +0000 (13:51 +0200)
After 41d4aa7de68ed551010f27ff04ffc54e7616292a, some builder.getStringAttr
calls in FIR were wrong.

flang/include/flang/Optimizer/Dialect/FIROps.td
flang/lib/Optimizer/Dialect/FIROps.cpp

index 51336e1..2d756fc 100644 (file)
@@ -3281,7 +3281,7 @@ def fir_DispatchTableOp : fir_Op<"dispatch_table",
 
     // Convert the parsed name attr into a string attr.
     result.attributes.set(mlir::SymbolTable::getSymbolAttrName(),
-      parser.getBuilder().getStringAttr(nameAttr.getRootReference()));
+      nameAttr.getRootReference());
 
     // Parse the optional table body.
     mlir::Region *body = result.addRegion();
index ecdcdfc..789964c 100644 (file)
@@ -581,7 +581,7 @@ static ParseResult parseGlobalOp(OpAsmParser &parser, OperationState &result) {
                             result.attributes))
     return mlir::failure();
   result.addAttribute(mlir::SymbolTable::getSymbolAttrName(),
-                      builder.getStringAttr(nameAttr.getRootReference()));
+                      nameAttr.getRootReference());
 
   bool simpleInitializer = false;
   if (mlir::succeeded(parser.parseOptionalLParen())) {