Skip to content

[Cherry-pick into stable/20230725] Fix log format strings #7688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) {
if (log) {
std::string cmdstr;
args.GetCommandString(cmdstr);
log->Printf("GetXcodeSDK() running shell cmd '%s'", cmdstr.c_str());
LLDB_LOG(log, "GetXcodeSDK() running shell cmd '{0}'", cmdstr);
}

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