[MLIR] Add variadic isa<> for Type, Value, and Attribute

- Also adopt variadic llvm::isa<> in more places.
- Fixes https://bugs.llvm.org/show_bug.cgi?id=46445

Differential Revision: https://reviews.llvm.org/D82769
This commit is contained in:
Rahul Joshi
2020-06-29 07:31:48 -07:00
parent 657ac8e717
commit ee394e6842
28 changed files with 76 additions and 68 deletions

View File

@@ -778,8 +778,7 @@ LogicalResult ModuleTranslation::convertOneFunction(LLVMFuncOp func) {
LogicalResult ModuleTranslation::checkSupportedModuleOps(Operation *m) {
for (Operation &o : getModuleBody(m).getOperations())
if (!isa<LLVM::LLVMFuncOp>(&o) && !isa<LLVM::GlobalOp>(&o) &&
!o.isKnownTerminator())
if (!isa<LLVM::LLVMFuncOp, LLVM::GlobalOp>(&o) && !o.isKnownTerminator())
return o.emitOpError("unsupported module-level operation");
return success();
}