diff options
author | Muhammad Omair Javaid <omair.javaid@linaro.org> | 2023-05-15 14:25:52 +0400 |
---|---|---|
committer | Muhammad Omair Javaid <omair.javaid@linaro.org> | 2023-05-15 22:49:00 +0400 |
commit | 58e6caaba1cf623292c8898be30a5a56722432b3 (patch) | |
tree | b9bcb184021b7723283cc60f553604aa0b1c1ade /lldb | |
parent | f39fd750ab59cb2482688168b25db303dbebdb09 (diff) | |
download | llvm-58e6caaba1cf623292c8898be30a5a56722432b3.tar.gz |
Revert "[lldb] Refactor SBFileSpec::GetDirectory"
This reverts commit 2bea2d7b070dc5df723ce2b92dbc654b8bb1847e.
It introduced following failures on buildbot lldb-aarch64-windows:
lldb-api :: functionalities/process_save_core/TestProcessSaveCore.py
lldb-api :: python_api/symbol-context/TestSymbolContext.py
Differential Revision: https://reviews.llvm.org/D149625
Diffstat (limited to 'lldb')
-rw-r--r-- | lldb/source/API/SBFileSpec.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/API/SBFileSpec.cpp b/lldb/source/API/SBFileSpec.cpp index 8668b64b4ce7..a7df9afc4b8e 100644 --- a/lldb/source/API/SBFileSpec.cpp +++ b/lldb/source/API/SBFileSpec.cpp @@ -114,7 +114,9 @@ const char *SBFileSpec::GetFilename() const { const char *SBFileSpec::GetDirectory() const { LLDB_INSTRUMENT_VA(this); - return m_opaque_up->GetDirectory().GetCString(); + FileSpec directory{*m_opaque_up}; + directory.ClearFilename(); + return directory.GetPathAsConstString().GetCString(); } void SBFileSpec::SetFilename(const char *filename) { |