summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-07-17 16:51:16 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-07-17 16:51:16 +0000
commit3fce6b5da169c77c4047a4632f28b41d33d7c0a9 (patch)
tree0a541d89581484b9576762bb766fb67176c83223 /lldb
parent7f24757b8eb2a3e698a55e6a32c79829c4025bde (diff)
downloadbcm5719-llvm-3fce6b5da169c77c4047a4632f28b41d33d7c0a9.tar.gz
bcm5719-llvm-3fce6b5da169c77c4047a4632f28b41d33d7c0a9.zip
[lldb] Make log for ClangModulesDeclVendor's compiler flag less verbose
Summary: Currently the ClangModulesDeclVendor is spamming the expression log with the compiler flags it is using, which creates a log that looks like this: ``` clang -fmodules -fimplicit-module-maps ``` This patch removes all these newlines and just prints the compiler flags in one line as you see in the command line: ``` clang -fmodules -fimplicit-module-maps [...] ``` Reviewers: shafik, davide Reviewed By: davide Subscribers: davide, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64858 llvm-svn: 366347
Diffstat (limited to 'lldb')
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
index 941306fc0c3..4a220790e50 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
@@ -632,21 +632,16 @@ ClangModulesDeclVendor::Create(Target &target) {
clang::CompilerInstance::createDiagnostics(new clang::DiagnosticOptions,
new StoringDiagnosticConsumer);
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
- if (log)
- log->PutString("ClangModulesDeclVendor::Create()");
std::vector<const char *> compiler_invocation_argument_cstrs;
compiler_invocation_argument_cstrs.reserve(
compiler_invocation_arguments.size());
- for (const std::string &arg : compiler_invocation_arguments) {
+ for (const std::string &arg : compiler_invocation_arguments)
compiler_invocation_argument_cstrs.push_back(arg.c_str());
- if (log) {
- log->PutString("\n ");
- log->PutString(arg);
- }
- }
- if (log)
- log->PutString("\n");
+
+ Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
+ LLDB_LOG(log, "ClangModulesDeclVendor's compiler flags {0:$[ ]}",
+ llvm::make_range(compiler_invocation_arguments.begin(),
+ compiler_invocation_arguments.end()));
std::shared_ptr<clang::CompilerInvocation> invocation =
clang::createInvocationFromCommandLine(compiler_invocation_argument_cstrs,
OpenPOWER on IntegriCloud