[clang] [llvm] [llvm] properly guard dump methods in Support lib classes (PR #139938)

Andrew Rogers via cfe-commits cfe-commits at lists.llvm.org
Mon May 19 08:37:17 PDT 2025


andrurogerz wrote:

Ok, this link error makes sense when building an external project in debug mode against an llvm release build. I didn't realize that was a thing, but it makes sense so my mistake.

The issue is that we must only guard `dump` methods (that have definitions outside of the header) if they are not referenced in a public header, even if that reference is also guarded. In this example, the static helper method `llvm::ScaledNumberBase::dumpllvm::ScaledNumberBase::dump` is called by another `dump` method in `llvm/Support/ScaledNumber.h`. I think this issue is safe enough to fix-forward, but I will revert if not. I'll get a PR up shortly either way.

https://github.com/llvm/llvm-project/pull/139938


More information about the cfe-commits mailing list