Skip to content

Commit edd1b96

Browse files
Merge pull request #7689 from adrian-prantl/cherry-pick-swift-release-5.10-Fix-log-format-strings
[Cherry-pick into swift/release/5.10] Fix log format strings
2 parents a7d217d + e748321 commit edd1b96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) {
391391
if (log) {
392392
std::string cmdstr;
393393
args.GetCommandString(cmdstr);
394-
log->Printf("GetXcodeSDK() running shell cmd '%s'", cmdstr.c_str());
394+
LLDB_LOG(log, "GetXcodeSDK() running shell cmd '{0}'", cmdstr);
395395
}
396396

397397
int status = 0;
@@ -407,13 +407,13 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) {
407407
// Check that xcrun returned something useful.
408408
if (error.Fail()) {
409409
// Catastrophic error.
410-
LLDB_LOG(log, "xcrun failed to execute: %s", error.AsCString());
410+
LLDB_LOG(log, "xcrun failed to execute: {0}", error);
411411
return error.ToError();
412412
}
413413
if (status != 0) {
414414
// xcrun didn't find a matching SDK. Not an error, we'll try
415415
// different spellings.
416-
LLDB_LOG(log, "xcrun returned exit code %d", status);
416+
LLDB_LOG(log, "xcrun returned exit code {0}", status);
417417
return "";
418418
}
419419
if (output_str.empty()) {

0 commit comments

Comments
 (0)