@@ -169,10 +169,10 @@ std::recursive_mutex g_log_mutex;
169
169
170
170
// / Similar to LLDB_LOG, but with richer contextual information.
171
171
#define LOG_PRINTF (CHANNEL, FMT, ...) \
172
- LOG_PRINTF_IMPL (lldb_private::GetLogIfAllCategoriesSet (CHANNEL), false, FMT, \
172
+ LOG_PRINTF_IMPL (lldb_private::GetLogIfAnyCategoriesSet (CHANNEL), false, FMT, \
173
173
##__VA_ARGS__)
174
174
#define LOG_VERBOSE_PRINTF (CHANNEL, FMT, ...) \
175
- LOG_PRINTF_IMPL (lldb_private::GetLogIfAllCategoriesSet (CHANNEL), true, FMT, \
175
+ LOG_PRINTF_IMPL (lldb_private::GetLogIfAnyCategoriesSet (CHANNEL), true, FMT, \
176
176
##__VA_ARGS__)
177
177
#define LOG_PRINTF_IMPL (CHANNEL, VERBOSE, FMT, ...) \
178
178
do { \
@@ -3844,13 +3844,14 @@ void SwiftASTContext::LoadModule(swift::ModuleDecl *swift_module,
3844
3844
return ;
3845
3845
3846
3846
swift::LibraryKind library_kind = link_lib.getKind ();
3847
-
3848
- LOG_PRINTF (LIBLLDB_LOG_TYPES, " Loading link library \" %s\" of kind: %d." ,
3849
- library_name.c_str (), library_kind);
3847
+ LOG_PRINTF (LIBLLDB_LOG_TYPES | LIBLLDB_LOG_EXPRESSIONS,
3848
+ " Loading linked %s \" %s\" ." ,
3849
+ library_kind == swift::LibraryKind::Framework ? " framework"
3850
+ : " library" ,
3851
+ library_name.c_str ());
3850
3852
3851
3853
switch (library_kind) {
3852
3854
case swift::LibraryKind::Framework: {
3853
-
3854
3855
// First make sure the library isn't already loaded. Since this
3855
3856
// is a framework, we make sure the file name and the framework
3856
3857
// name are the same, and that we are contained in
@@ -8295,7 +8296,7 @@ static swift::ModuleDecl *LoadOneModule(const SourceModule &module,
8295
8296
error.Clear ();
8296
8297
ConstString toplevel = module .path .front ();
8297
8298
const std::string &m_description = swift_ast_context.GetDescription ();
8298
- LOG_PRINTF (LIBLLDB_LOG_EXPRESSIONS, " Importing module %s" ,
8299
+ LOG_PRINTF (LIBLLDB_LOG_TYPES | LIBLLDB_LOG_EXPRESSIONS, " Importing module %s" ,
8299
8300
toplevel.AsCString ());
8300
8301
swift::ModuleDecl *swift_module = nullptr ;
8301
8302
lldb::StackFrameSP this_frame_sp (stack_frame_wp.lock ());
@@ -8320,7 +8321,7 @@ static swift::ModuleDecl *LoadOneModule(const SourceModule &module,
8320
8321
// checked that DWARF debug info for this module actually exists
8321
8322
// and there is no good mechanism to do so ahead of time.
8322
8323
// We do know that we never load the stdlib from DWARF though.
8323
- LOG_PRINTF (LIBLLDB_LOG_EXPRESSIONS,
8324
+ LOG_PRINTF (LIBLLDB_LOG_TYPES | LIBLLDB_LOG_EXPRESSIONS,
8324
8325
" \" Imported\" module %s via SwiftDWARFImporterDelegate "
8325
8326
" (no Swift AST or Clang module found)" ,
8326
8327
toplevel.AsCString ());
@@ -8330,20 +8331,23 @@ static swift::ModuleDecl *LoadOneModule(const SourceModule &module,
8330
8331
}
8331
8332
8332
8333
if (!swift_module || !error.Success () || swift_ast_context.HasFatalErrors ()) {
8333
- LOG_PRINTF (LIBLLDB_LOG_EXPRESSIONS, " Couldn't import module %s: %s" ,
8334
- toplevel.AsCString (), error.AsCString ());
8334
+ LOG_PRINTF (LIBLLDB_LOG_TYPES | LIBLLDB_LOG_EXPRESSIONS,
8335
+ " Couldn't import module %s: %s" , toplevel.AsCString (),
8336
+ error.AsCString ());
8335
8337
8336
8338
if (!swift_module || swift_ast_context.HasFatalErrors ()) {
8337
8339
return nullptr ;
8338
8340
}
8339
8341
}
8340
8342
8341
- if (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)) {
8343
+ if (lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_TYPES |
8344
+ LIBLLDB_LOG_EXPRESSIONS)) {
8342
8345
StreamString ss;
8343
8346
for (swift::FileUnit *file_unit : swift_module->getFiles ())
8344
8347
DescribeFileUnit (ss, file_unit);
8345
- LOG_PRINTF (LIBLLDB_LOG_EXPRESSIONS, " Imported module %s from {%s}" ,
8346
- module .path .front ().AsCString (), ss.GetData ());
8348
+ LOG_PRINTF (LIBLLDB_LOG_TYPES | LIBLLDB_LOG_EXPRESSIONS,
8349
+ " Imported module %s from {%s}" , module .path .front ().AsCString (),
8350
+ ss.GetData ());
8347
8351
}
8348
8352
return swift_module;
8349
8353
}
@@ -8411,7 +8415,7 @@ bool SwiftASTContext::CacheUserImports(SwiftASTContext &swift_ast_context,
8411
8415
SourceModule module_info;
8412
8416
ConstString module_const_str (module_name);
8413
8417
module_info.path .push_back (module_const_str);
8414
- LOG_PRINTF (LIBLLDB_LOG_EXPRESSIONS,
8418
+ LOG_PRINTF (LIBLLDB_LOG_TYPES | LIBLLDB_LOG_EXPRESSIONS,
8415
8419
" Performing auto import on found module: %s.\n " ,
8416
8420
module_name.c_str ());
8417
8421
if (!LoadOneModule (module_info, swift_ast_context, stack_frame_wp,
0 commit comments