Skip to content

Commit 679089e

Browse files
aahrunda-viper
andauthored
Update lldb/tools/lldb-dap/JSONUtils.cpp
Co-authored-by: Ebuka Ezike <[email protected]>
1 parent 28aa746 commit 679089e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lldb/tools/lldb-dap/JSONUtils.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,8 @@ llvm::json::Value CreateStackFrame(DAP &dap, lldb::SBFrame &frame,
554554

555555
lldb::SBModule module = frame.GetModule();
556556
if (module.IsValid()) {
557-
const char *uuid_cstr = module.GetUUIDString();
558-
std::string uuid = uuid_cstr ? uuid_cstr : "";
559-
if (!uuid.empty())
560-
object.try_emplace("moduleId", uuid);
557+
if (const llvm::StringRef uuid = module.GetUUIDString(); !uuid.empty())
558+
object.try_emplace("moduleId", uuid.str());
561559
}
562560

563561
return llvm::json::Value(std::move(object));

0 commit comments

Comments
 (0)