[flang-commits] [flang] 58e1a5e - [flang][mlir] Fix FIR after D108899
Jean Perier via flang-commits
flang-commits at lists.llvm.org
Mon Aug 30 04:52:56 PDT 2021
Author: Jean Perier
Date: 2021-08-30T13:51:39+02:00
New Revision: 58e1a5e4c29325dc985ad4976d65fab53f05e946
URL: https://github.com/llvm/llvm-project/commit/58e1a5e4c29325dc985ad4976d65fab53f05e946
DIFF: https://github.com/llvm/llvm-project/commit/58e1a5e4c29325dc985ad4976d65fab53f05e946.diff
LOG: [flang][mlir] Fix FIR after D108899
After 41d4aa7de68ed551010f27ff04ffc54e7616292a, some builder.getStringAttr
calls in FIR were wrong.
Added:
Modified:
flang/include/flang/Optimizer/Dialect/FIROps.td
flang/lib/Optimizer/Dialect/FIROps.cpp
Removed:
################################################################################
diff --git a/flang/include/flang/Optimizer/Dialect/FIROps.td b/flang/include/flang/Optimizer/Dialect/FIROps.td
index 51336e15fb8b1..2d756fc1e961f 100644
--- a/flang/include/flang/Optimizer/Dialect/FIROps.td
+++ b/flang/include/flang/Optimizer/Dialect/FIROps.td
@@ -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();
diff --git a/flang/lib/Optimizer/Dialect/FIROps.cpp b/flang/lib/Optimizer/Dialect/FIROps.cpp
index ecdcdfcaaaea5..789964c7f8968 100644
--- a/flang/lib/Optimizer/Dialect/FIROps.cpp
+++ b/flang/lib/Optimizer/Dialect/FIROps.cpp
@@ -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())) {
More information about the flang-commits
mailing list