Currently we use #pragma push_macro(LLVM_DEBUG) to fiddle with the LLVM_DEBUG macro so that we can silence debugging the Knuth division algorithm unless it's actually desired. Unfortunately this is incompatible with enabling modules while building LLVM (via LLVM_ENABLE_MODULES=ON) because the macro then has incompatible definitions in a single translation unit.
This patch changes the Knuth division function to use a special KNUTH_DEBUG throughout, which can be #defined to LLVM_DEBUG if debug output is desired. A default implementation doing nothing is provided locally (rather than in include/llvm/Support/Debug.h).