[Basic] Move DiagnosticsEngine::dump from .h to .cpp
authorFangrui Song <maskray@google.com>
Sat, 1 Dec 2018 01:43:05 +0000 (01:43 +0000)
committerFangrui Song <maskray@google.com>
Sat, 1 Dec 2018 01:43:05 +0000 (01:43 +0000)
commit2f553207419ae621452200b1a6ff70eef66b4f9b
tree6601324f6f6a0c7ae1ea882053eaed10ac04e7d1
parentfbb925462e02fbf280e510b079e46745c2d357e0
[Basic] Move DiagnosticsEngine::dump from .h to .cpp

The two LLVM_DUMP_METHOD methods have a undefined reference on clang::DiagnosticsEngine::DiagStateMap::dump.

tools/clang/tools/extra/clangd/benchmarks/IndexBenchmark links in
clangDaemon but does not link in clangBasic explicitly, which causes a
linker error "undefined symbol" in !NDEBUG + -DBUILD_SHARED_LIBS=on builds.

Move LLVM_DUMP_METHOD methods to .cpp to fix IndexBenchmark. They should
be unconditionally defined as they are also used by non-dump-method #pragma clang __debug diag_mapping

llvm-svn: 348065
clang/include/clang/Basic/Diagnostic.h
clang/lib/Basic/Diagnostic.cpp