This will be needed to be able to use this interface in HLFIR ODS operation definition
and get the right namespaces.
Differential Revision: https://reviews.llvm.org/D137702
}
def fir_DeclareOp : fir_Op<"declare", [AttrSizedOperandSegments,
- DeclareOpInterfaceMethods<FortranVariableOpInterface>]> {
+ DeclareOpInterfaceMethods<fir_FortranVariableOpInterface>]> {
let summary = "declare a variable";
let description = [{
#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
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.
}];
+ let cppNamespace = "fir";
+
let verify = [{
return ::mlir::cast<::fir::FortranVariableOpInterface>($_op).verifyImpl();
}];
#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();