[Mlir-commits] [mlir] [MLIR][Python] Remove partial LLVM APIs in python bindings (4/n) (PR #180256)
Jakub Kuderski
llvmlistbot at llvm.org
Fri Feb 6 12:57:28 PST 2026
================
@@ -132,9 +133,10 @@ void PyGlobals::registerOperationImpl(const std::string &operationName,
nb::ft_lock_guard lock(mutex);
nb::object &found = operationClassMap[operationName];
if (found && !replace) {
- throw std::runtime_error((llvm::Twine("Operation '") + operationName +
- "' is already registered.")
- .str());
+ throw std::runtime_error(nanobind::detail::join("Operation '",
+ operationName,
+ "' is already registered.")
+ .c_str());
----------------
kuhar wrote:
We shouldn't need these `c_str`s -- it sued to throw strings, not c strings. Also elsewhere
https://github.com/llvm/llvm-project/pull/180256
More information about the Mlir-commits
mailing list