aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Bindings/Python/IRModule.cpp
diff options
context:
space:
mode:
authorMehdi Amini <joker.eph@gmail.com>2021-12-20 19:45:05 +0000
committerMehdi Amini <joker.eph@gmail.com>2021-12-20 20:25:01 +0000
commit02b6fb218e44490f3ea1597e35df1b1b66c6b869 (patch)
tree64123cc6af2a17d765e5908f403f0f16bd52f407 /mlir/lib/Bindings/Python/IRModule.cpp
parent3e5b1b77d554797d4305037334a220fe9bc633ab (diff)
downloadllvm-02b6fb218e44490f3ea1597e35df1b1b66c6b869.zip
llvm-02b6fb218e44490f3ea1597e35df1b1b66c6b869.tar.gz
llvm-02b6fb218e44490f3ea1597e35df1b1b66c6b869.tar.bz2
Fix clang-tidy issues in mlir/ (NFC)
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D115956
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;
}
}