Thanks for the cleanup!
You may want to tag the dump() ones with LLVM_DUMP_METHOD:
/// Mark debug helper function definitions like dump() that should not be /// stripped from debug builds. /// Note that you should also surround dump() functions with /// `#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` so they do always /// get stripped in release builds. #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED #else #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE #endif
Most places in LLVM would have it defined like this: LLVM_DUMP_METHOD void dump() const;