[flang-commits] [PATCH] D137702: [flang][NFC] move fir namespace into FortranVariableOpInterface ODS declaration

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Nov 9 02:42:05 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa621e799168f: [flang][NFC] move fir namespace into FortranVariableOpInterface ODS declaration (authored by jeanPerier).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137702/new/

https://reviews.llvm.org/D137702

Files:
  flang/include/flang/Optimizer/Dialect/FIROps.td
  flang/include/flang/Optimizer/Dialect/FortranVariableInterface.h
  flang/include/flang/Optimizer/Dialect/FortranVariableInterface.td
  flang/lib/Optimizer/Dialect/FortranVariableInterface.cpp


Index: flang/lib/Optimizer/Dialect/FortranVariableInterface.cpp
===================================================================
--- flang/lib/Optimizer/Dialect/FortranVariableInterface.cpp
+++ flang/lib/Optimizer/Dialect/FortranVariableInterface.cpp
@@ -12,9 +12,7 @@
 
 #include "flang/Optimizer/Dialect/FortranVariableInterface.h"
 
-namespace fir {
 #include "flang/Optimizer/Dialect/FortranVariableInterface.cpp.inc"
-}
 
 mlir::LogicalResult fir::FortranVariableOpInterface::verifyImpl() {
   const unsigned numExplicitTypeParams = getExplicitTypeParams().size();
Index: flang/include/flang/Optimizer/Dialect/FortranVariableInterface.td
===================================================================
--- flang/include/flang/Optimizer/Dialect/FortranVariableInterface.td
+++ flang/include/flang/Optimizer/Dialect/FortranVariableInterface.td
@@ -16,7 +16,7 @@
 include "mlir/IR/OpBase.td"
 
 
-def FortranVariableOpInterface : OpInterface<"FortranVariableOpInterface"> {
+def fir_FortranVariableOpInterface : OpInterface<"FortranVariableOpInterface"> {
   let description = [{
     Interface for operations that create Fortran like variables in order to
     query about all their Fortran properties.
@@ -151,6 +151,8 @@
 
   }];
 
+  let cppNamespace = "fir";
+
   let verify = [{
     return ::mlir::cast<::fir::FortranVariableOpInterface>($_op).verifyImpl();
   }];
Index: flang/include/flang/Optimizer/Dialect/FortranVariableInterface.h
===================================================================
--- flang/include/flang/Optimizer/Dialect/FortranVariableInterface.h
+++ flang/include/flang/Optimizer/Dialect/FortranVariableInterface.h
@@ -19,8 +19,6 @@
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/OpDefinition.h"
 
-namespace fir {
 #include "flang/Optimizer/Dialect/FortranVariableInterface.h.inc"
-} // namespace fir
 
 #endif // FORTRAN_OPTIMIZER_DIALECT_FORTRANVARIABLEINTERFACE_H
Index: flang/include/flang/Optimizer/Dialect/FIROps.td
===================================================================
--- flang/include/flang/Optimizer/Dialect/FIROps.td
+++ flang/include/flang/Optimizer/Dialect/FIROps.td
@@ -2872,7 +2872,7 @@
 }
 
 def fir_DeclareOp : fir_Op<"declare", [AttrSizedOperandSegments,
-    DeclareOpInterfaceMethods<FortranVariableOpInterface>]> {
+    DeclareOpInterfaceMethods<fir_FortranVariableOpInterface>]> {
   let summary = "declare a variable";
 
   let description = [{


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137702.474209.patch
Type: text/x-patch
Size: 2434 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221109/0287891e/attachment-0001.bin>


More information about the flang-commits mailing list