Skip to content

Commit 2bd30fd

Browse files
make APIs use std::string instead of std::wstring
1 parent 1ba6ded commit 2bd30fd

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lldb/include/lldb/Target/StackFrame.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class StackFrame : public ExecutionContextScope,
354354
/// \param [in] frame_marker
355355
/// Optional string that will be prepended to the frame output description.
356356
void DumpUsingSettingsFormat(Stream *strm, bool show_unique = false,
357-
const std::wstring &frame_marker = L"");
357+
const std::string &frame_marker = "");
358358

359359
/// Print a description for this frame using a default format.
360360
///
@@ -391,7 +391,7 @@ class StackFrame : public ExecutionContextScope,
391391
/// Returns true if successful.
392392
bool GetStatus(Stream &strm, bool show_frame_info, bool show_source,
393393
bool show_unique = false,
394-
const std::wstring &frame_marker = L"");
394+
const std::string &frame_marker = "");
395395

396396
/// Query whether this frame is a concrete frame on the call stack, or if it
397397
/// is an inlined frame derived from the debug information and presented by

lldb/source/Target/StackFrame.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#include "lldb/ValueObject/ValueObjectConstResult.h"
3838
#include "lldb/ValueObject/ValueObjectMemory.h"
3939
#include "lldb/ValueObject/ValueObjectVariable.h"
40-
#include "llvm/Support/ConvertUTF.h"
4140

4241
#include "lldb/lldb-enumerations.h"
4342

@@ -1936,7 +1935,7 @@ bool StackFrame::DumpUsingFormat(Stream &strm,
19361935
}
19371936

19381937
void StackFrame::DumpUsingSettingsFormat(Stream *strm, bool show_unique,
1939-
const std::wstring &frame_marker) {
1938+
const std::string &frame_marker) {
19401939
if (strm == nullptr)
19411940
return;
19421941

@@ -1955,9 +1954,7 @@ void StackFrame::DumpUsingSettingsFormat(Stream *strm, bool show_unique,
19551954
}
19561955
}
19571956

1958-
std::string frame_marker_utf8;
1959-
llvm::convertWideToUTF8(frame_marker, frame_marker_utf8);
1960-
if (!DumpUsingFormat(*strm, frame_format, frame_marker_utf8)) {
1957+
if (!DumpUsingFormat(*strm, frame_format, frame_marker)) {
19611958
Dump(strm, true, false);
19621959
strm->EOL();
19631960
}
@@ -2038,7 +2035,7 @@ bool StackFrame::HasCachedData() const {
20382035
}
20392036

20402037
bool StackFrame::GetStatus(Stream &strm, bool show_frame_info, bool show_source,
2041-
bool show_unique, const std::wstring &frame_marker) {
2038+
bool show_unique, const std::string &frame_marker) {
20422039
if (show_frame_info) {
20432040
strm.Indent();
20442041
DumpUsingSettingsFormat(&strm, show_unique, frame_marker);

lldb/source/Target/StackFrameList.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "lldb/Utility/LLDBLog.h"
2828
#include "lldb/Utility/Log.h"
2929
#include "llvm/ADT/SmallPtrSet.h"
30+
#include "llvm/Support/ConvertUTF.h"
3031

3132
#include <memory>
3233

@@ -958,9 +959,11 @@ size_t StackFrameList::GetStatus(Stream &strm, uint32_t first_frame,
958959
m_thread.GetID(), num_frames_displayed))
959960
break;
960961

962+
std::string marker_utf8;
963+
llvm::convertWideToUTF8(marker, marker_utf8);
961964
if (!frame_sp->GetStatus(strm, show_frame_info,
962965
num_frames_with_source > (first_frame - frame_idx),
963-
show_unique, marker))
966+
show_unique, marker_utf8))
964967
break;
965968
++num_frames_displayed;
966969
}

0 commit comments

Comments
 (0)