aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Bindings/Python/IRModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Bindings/Python/IRModule.cpp')
-rw-r--r--mlir/lib/Bindings/Python/IRModule.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/mlir/lib/Bindings/Python/IRModule.cpp b/mlir/lib/Bindings/Python/IRModule.cpp
index 9f853eb..7008e54 100644
--- a/mlir/lib/Bindings/Python/IRModule.cpp
+++ b/mlir/lib/Bindings/Python/IRModule.cpp
@@ -51,9 +51,8 @@ void PyGlobals::loadDialectModule(llvm::StringRef dialectNamespace) {
} catch (py::error_already_set &e) {
if (e.matches(PyExc_ModuleNotFoundError)) {
continue;
- } else {
- throw;
}
+ throw;
}
break;
}
@@ -136,11 +135,10 @@ PyGlobals::lookupRawOpViewClass(llvm::StringRef operationName) {
// Positive cache.
rawOpViewClassMapCache[operationName] = foundIt->second;
return foundIt->second;
- } else {
- // Negative cache.
- rawOpViewClassMap[operationName] = py::none();
- return llvm::None;
}
+ // Negative cache.
+ rawOpViewClassMap[operationName] = py::none();
+ return llvm::None;
}
}