[Mlir-commits] [mlir] 9e5f9ff - [MLIR] Fix release build: reference to NDEBUG guarded function (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Sun Jul 27 13:25:07 PDT 2025
Author: Mehdi Amini
Date: 2025-07-27T13:24:54-07:00
New Revision: 9e5f9ff82f2f060aac73a965ab37fdbb6b53cfe0
URL: https://github.com/llvm/llvm-project/commit/9e5f9ff82f2f060aac73a965ab37fdbb6b53cfe0
DIFF: https://github.com/llvm/llvm-project/commit/9e5f9ff82f2f060aac73a965ab37fdbb6b53cfe0.diff
LOG: [MLIR] Fix release build: reference to NDEBUG guarded function (NFC)
With LDBG(), the code isn't guarded in release mode, even if the optimizer
will remove it because there is a `if (false)` statement. We need the
function declaration to be there at minima.
Added:
Modified:
mlir/lib/Transforms/Utils/Inliner.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Transforms/Utils/Inliner.cpp b/mlir/lib/Transforms/Utils/Inliner.cpp
index dc780652cbe9d..26c965cfc0237 100644
--- a/mlir/lib/Transforms/Utils/Inliner.cpp
+++ b/mlir/lib/Transforms/Utils/Inliner.cpp
@@ -348,13 +348,11 @@ static void collectCallOps(iterator_range<Region::iterator> blocks,
// InlinerInterfaceImpl
//===----------------------------------------------------------------------===//
-#ifndef NDEBUG
static std::string getNodeName(CallOpInterface op) {
if (llvm::dyn_cast_if_present<SymbolRefAttr>(op.getCallableForCallee()))
return debugString(op);
return "_unnamed_callee_";
}
-#endif
/// Return true if the specified `inlineHistoryID` indicates an inline history
/// that already includes `node`.
More information about the Mlir-commits
mailing list