diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-11-14 13:57:49 -0800 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-11-15 11:52:13 -0800 |
commit | 1cbe0038944a39ba79078997f9c65ba8abf6fbdd (patch) | |
tree | 56f59d50075a7e99c26c27829c5c36a2e134cf4c /lldb/source/Host | |
parent | 7d71dd928d1dcc838dc4dbe5cf294f557609f271 (diff) | |
download | bcm5719-llvm-1cbe0038944a39ba79078997f9c65ba8abf6fbdd.tar.gz bcm5719-llvm-1cbe0038944a39ba79078997f9c65ba8abf6fbdd.zip |
[-gmodules] Let LLDB log a warning if the Clang module hash mismatches.
This feature is mostly there to aid debugging of Clang module issues,
since the only useful actual the end-user can to is to recompile their
program.
Differential Revision: https://reviews.llvm.org/D70272
Diffstat (limited to 'lldb/source/Host')
-rw-r--r-- | lldb/source/Host/common/Host.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index 8e210c7e5fa..5fbb655fc79 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -293,10 +293,21 @@ void Host::SystemLog(SystemLogType type, const char *format, va_list args) { #endif void Host::SystemLog(SystemLogType type, const char *format, ...) { - va_list args; - va_start(args, format); - SystemLog(type, format, args); - va_end(args); + { + va_list args; + va_start(args, format); + SystemLog(type, format, args); + va_end(args); + } + + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST)); + if (log && log->GetVerbose()) { + // Log to log channel. This allows testcases to grep for log output. + va_list args; + va_start(args, format); + log->VAPrintf(format, args); + va_end(args); + } } lldb::pid_t Host::GetCurrentProcessID() { return ::getpid(); } |