[Logging] Fix format strings
Change format strings to use the `{}` syntax instead of the printf
syntax when using LLDB_LOG.
llvm-svn: 366824
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 71819a9..ee48f2b 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -106,12 +106,11 @@
CheckInWithManager();
- Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
- if (log)
- log->Printf("%p Target::Target()", static_cast<void *>(this));
+ LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT),
+ "{0} Target::Target()", static_cast<void *>(this));
if (target_arch.IsValid()) {
LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TARGET),
- "Target::Target created with architecture %s (%s)",
+ "Target::Target created with architecture {0} ({1})",
target_arch.GetArchitectureName(),
target_arch.GetTriple().getTriple().c_str());
}
@@ -119,8 +118,7 @@
Target::~Target() {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
- if (log)
- log->Printf("%p Target::~Target()", static_cast<void *>(this));
+ LLDB_LOG(log, "{0} Target::~Target()", static_cast<void *>(this));
DeleteCurrentProcess();
}
@@ -2321,8 +2319,8 @@
if (properties_sp) {
LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TARGET),
"Target::SetDefaultArchitecture setting target's "
- "default architecture to %s (%s)",
- arch.GetArchitectureName(), arch.GetTriple().getTriple().c_str());
+ "default architecture to {0} ({1})",
+ arch.GetArchitectureName(), arch.GetTriple().getTriple());
return properties_sp->SetDefaultArchitecture(arch);
}
}