[Lldb-commits] [lldb] [lldb] Fix build after FileSpec::GetDirectory() ConstString removal (PR #207073)

via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 1 12:59:09 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Sylvestre Ledru (sylvestre)

<details>
<summary>Changes</summary>

FileSpec::GetDirectory() now returns llvm::StringRef instead of ConstString, so the .GetStringRef() call no longer compiles.

Regressed by f9b5264523b1 ("[lldb] Remove ConstString getters from FileSpec", #<!-- -->206802).

---
Full diff: https://github.com/llvm/llvm-project/pull/207073.diff


1 Files Affected:

- (modified) lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleSaver.cpp (+1-2) 


``````````diff
diff --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleSaver.cpp b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleSaver.cpp
index 3827750d2f489..fc0620428a7bd 100644
--- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleSaver.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleSaver.cpp
@@ -272,8 +272,7 @@ BuildModulesSection(Process &process, FileSpec directory) {
     FileSpec path_to_copy_module = directory;
     path_to_copy_module.AppendPathComponent("modules");
     path_to_copy_module.AppendPathComponent(system_path);
-    sys::fs::create_directories(
-        path_to_copy_module.GetDirectory().GetStringRef());
+    sys::fs::create_directories(path_to_copy_module.GetDirectory());
 
     if (std::error_code ec =
             llvm::sys::fs::copy_file(file, path_to_copy_module.GetPath()))

``````````

</details>


https://github.com/llvm/llvm-project/pull/207073


More information about the lldb-commits mailing list