@@ -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
@@ -8299,7 +8300,7 @@ static swift::ModuleDecl *LoadOneModule(const SourceModule &module,
8299
8300
error.Clear ();
8300
8301
ConstString toplevel = module .path .front ();
8301
8302
const std::string &m_description = swift_ast_context.GetDescription ();
8302
- LOG_PRINTF (LIBLLDB_LOG_EXPRESSIONS, " Importing module %s" ,
8303
+ LOG_PRINTF (LIBLLDB_LOG_TYPES | LIBLLDB_LOG_EXPRESSIONS, " Importing module %s" ,
8303
8304
toplevel.AsCString ());
8304
8305
swift::ModuleDecl *swift_module = nullptr ;
8305
8306
lldb::StackFrameSP this_frame_sp (stack_frame_wp.lock ());
@@ -8324,7 +8325,7 @@ static swift::ModuleDecl *LoadOneModule(const SourceModule &module,
8324
8325
// checked that DWARF debug info for this module actually exists
8325
8326
// and there is no good mechanism to do so ahead of time.
8326
8327
// We do know that we never load the stdlib from DWARF though.
8327
- LOG_PRINTF (LIBLLDB_LOG_EXPRESSIONS,
8328
+ LOG_PRINTF (LIBLLDB_LOG_TYPES | LIBLLDB_LOG_EXPRESSIONS,
8328
8329
" \" Imported\" module %s via SwiftDWARFImporterDelegate "
8329
8330
" (no Swift AST or Clang module found)" ,
8330
8331
toplevel.AsCString ());
@@ -8334,20 +8335,23 @@ static swift::ModuleDecl *LoadOneModule(const SourceModule &module,
8334
8335
}
8335
8336
8336
8337
if (!swift_module || !error.Success () || swift_ast_context.HasFatalErrors ()) {
8337
- LOG_PRINTF (LIBLLDB_LOG_EXPRESSIONS, " Couldn't import module %s: %s" ,
8338
- toplevel.AsCString (), error.AsCString ());
8338
+ LOG_PRINTF (LIBLLDB_LOG_TYPES | LIBLLDB_LOG_EXPRESSIONS,
8339
+ " Couldn't import module %s: %s" , toplevel.AsCString (),
8340
+ error.AsCString ());
8339
8341
8340
8342
if (!swift_module || swift_ast_context.HasFatalErrors ()) {
8341
8343
return nullptr ;
8342
8344
}
8343
8345
}
8344
8346
8345
- if (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)) {
8347
+ if (lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_TYPES |
8348
+ LIBLLDB_LOG_EXPRESSIONS)) {
8346
8349
StreamString ss;
8347
8350
for (swift::FileUnit *file_unit : swift_module->getFiles ())
8348
8351
DescribeFileUnit (ss, file_unit);
8349
- LOG_PRINTF (LIBLLDB_LOG_EXPRESSIONS, " Imported module %s from {%s}" ,
8350
- module .path .front ().AsCString (), ss.GetData ());
8352
+ LOG_PRINTF (LIBLLDB_LOG_TYPES | LIBLLDB_LOG_EXPRESSIONS,
8353
+ " Imported module %s from {%s}" , module .path .front ().AsCString (),
8354
+ ss.GetData ());
8351
8355
}
8352
8356
return swift_module;
8353
8357
}
@@ -8415,7 +8419,7 @@ bool SwiftASTContext::CacheUserImports(SwiftASTContext &swift_ast_context,
8415
8419
SourceModule module_info;
8416
8420
ConstString module_const_str (module_name);
8417
8421
module_info.path .push_back (module_const_str);
8418
- LOG_PRINTF (LIBLLDB_LOG_EXPRESSIONS,
8422
+ LOG_PRINTF (LIBLLDB_LOG_TYPES | LIBLLDB_LOG_EXPRESSIONS,
8419
8423
" Performing auto import on found module: %s.\n " ,
8420
8424
module_name.c_str ());
8421
8425
if (!LoadOneModule (module_info, swift_ast_context, stack_frame_wp,
0 commit comments