Skip to content

Commit b509831

Browse files
committed
[lldb-dap] Fix formatting chrono::seconds.
1 parent 332e181 commit b509831

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lldb/tools/lldb-dap/DAP.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "llvm/ADT/StringExtras.h"
3636
#include "llvm/ADT/StringRef.h"
3737
#include "llvm/ADT/Twine.h"
38+
#include "llvm/Support/Chrono.h"
3839
#include "llvm/Support/Error.h"
3940
#include "llvm/Support/ErrorHandling.h"
4041
#include "llvm/Support/FormatVariadic.h"
@@ -968,8 +969,10 @@ lldb::SBError DAP::WaitForProcessToStop(std::chrono::seconds seconds) {
968969
}
969970
std::this_thread::sleep_for(std::chrono::microseconds(250));
970971
}
971-
error.SetErrorStringWithFormat("process failed to stop within %lld seconds",
972-
seconds.count());
972+
error.SetErrorString(
973+
llvm::formatv("process failed to stop within {0}", seconds)
974+
.str()
975+
.c_str());
973976
return error;
974977
}
975978

0 commit comments

Comments
 (0)