diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2021-12-20 19:45:05 +0000 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2021-12-20 20:25:01 +0000 |
commit | 02b6fb218e44490f3ea1597e35df1b1b66c6b869 (patch) | |
tree | 64123cc6af2a17d765e5908f403f0f16bd52f407 /mlir/lib/Bindings/Python/IRModule.cpp | |
parent | 3e5b1b77d554797d4305037334a220fe9bc633ab (diff) | |
download | llvm-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.cpp | 10 |
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; } } |