[Mlir-commits] [mlir] [mlir] Guard expensive string-based asserts behind EXPENSIVE_CHECKS (PR #93111)
Mehdi Amini
llvmlistbot at llvm.org
Wed May 22 18:21:18 PDT 2024
================
@@ -303,7 +300,7 @@ class AttributeInterface
protected:
/// Returns the impl interface instance for the given type.
static typename InterfaceBase::Concept *getInterfaceFor(Attribute attr) {
-#ifndef NDEBUG
+#ifdef EXPENSIVE_CHECKS
----------------
joker-eph wrote:
> What if we had a separate flag that was also on by default but toggleable?
That seems fine to me.
> The problem is that because this is in a header file, it's subject to the NDEBUG flag of whoever includes the file, not the LLVM binaries themselves.
Which is WAI I believe: they build in assert mode means they want to catch issues in their project, so this will catch issues with their uses of isa/...
https://github.com/llvm/llvm-project/pull/93111
More information about the Mlir-commits
mailing list