diff --git a/mlir/include/mlir/Interfaces/CallInterfaces.h b/mlir/include/mlir/Interfaces/CallInterfaces.h --- a/mlir/include/mlir/Interfaces/CallInterfaces.h +++ b/mlir/include/mlir/Interfaces/CallInterfaces.h @@ -28,4 +28,12 @@ /// Include the generated interface declarations. #include "mlir/Interfaces/CallInterfaces.h.inc" +namespace llvm { + +template +struct CastInfo + : public CastInfo {}; + +} // namespace llvm + #endif // MLIR_INTERFACES_CALLINTERFACES_H diff --git a/mlir/lib/Interfaces/CallInterfaces.cpp b/mlir/lib/Interfaces/CallInterfaces.cpp --- a/mlir/lib/Interfaces/CallInterfaces.cpp +++ b/mlir/lib/Interfaces/CallInterfaces.cpp @@ -21,7 +21,7 @@ Operation * CallOpInterface::resolveCallable(SymbolTableCollection *symbolTable) { CallInterfaceCallable callable = getCallableForCallee(); - if (auto symbolVal = callable.dyn_cast()) + if (auto symbolVal = dyn_cast(callable)) return symbolVal.getDefiningOp(); // If the callable isn't a value, lookup the symbol reference. diff --git a/mlir/lib/Transforms/Inliner.cpp b/mlir/lib/Transforms/Inliner.cpp --- a/mlir/lib/Transforms/Inliner.cpp +++ b/mlir/lib/Transforms/Inliner.cpp @@ -344,7 +344,7 @@ if (auto call = dyn_cast(op)) { // TODO: Support inlining nested call references. CallInterfaceCallable callable = call.getCallableForCallee(); - if (SymbolRefAttr symRef = callable.dyn_cast()) { + if (SymbolRefAttr symRef = dyn_cast(callable)) { if (!symRef.isa()) continue; }