Author: Jakob Johnson Date: 2022-08-01T11:52:15-07:00 New Revision: 9bab358e39225a657be829962d7f9532b492ca93
URL: https://github.com/llvm/llvm-project/commit/9bab358e39225a657be829962d7f9532b492ca93 DIFF: https://github.com/llvm/llvm-project/commit/9bab358e39225a657be829962d7f9532b492ca93.diff LOG: [trace][intelpt] Update TraceIntelPTBundleSaver.cpp to accommodate FileSpec API changes D130309 introduced changes to the FileSpec API which broke usages of `GetCString()` in TraceIntelPTBundleSaver.cpp. This diff replaces usages of `GetCString()` with `GetPath().c_str()` as suggested by D130309. Test Plan: Building with the trace plug-in now succeeds Differential Revision: https://reviews.llvm.org/D130924 Added: Modified: lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleSaver.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleSaver.cpp b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleSaver.cpp index 8be70dc2139be..f35914f26ab7c 100644 --- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleSaver.cpp +++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleSaver.cpp @@ -103,7 +103,7 @@ BuildThreadsSection(Process &process, FileSpec directory) { FileSpec threads_dir = directory; threads_dir.AppendPathComponent("threads"); - sys::fs::create_directories(threads_dir.GetCString()); + sys::fs::create_directories(threads_dir.GetPath().c_str()); for (ThreadSP thread_sp : process.Threads()) { lldb::tid_t tid = thread_sp->GetID(); @@ -200,7 +200,7 @@ BuildCpusSection(TraceIntelPT &trace_ipt, FileSpec directory, bool compact) { std::vector<JSONCpu> json_cpus; FileSpec cpus_dir = directory; cpus_dir.AppendPathComponent("cpus"); - sys::fs::create_directories(cpus_dir.GetCString()); + sys::fs::create_directories(cpus_dir.GetPath().c_str()); for (lldb::cpu_id_t cpu_id : trace_ipt.GetTracedCpus()) { JSONCpu json_cpu; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits