[TypeSwitch/Compiler.h] Provide a LLVM_NODEBUG macro and use it in TypeSwitch.h
TypeSwitch.h is used pervasively in MLIR and often has dozens of types switched over. It uses "zero cost" variadic templates to implement the dispatching mechanism... which isn't zero cost in debug builds, and which causes a massive problem for actually debugging things that use it - you get dozens of nonsense frames in the debugger for simple things like a visitor. Fix this by marking the key method in TypeSwitch as nodebug + alwaysinline. This resolves LLVM PR49301 Differential Revision: https://reviews.llvm.org/D111520
Loading
Please sign in to comment