This revision was automatically updated to reflect the committed changes. Closed by commit rG58e6caaba1cf: Revert "[lldb] Refactor SBFileSpec::GetDirectory" (authored by omjavaid).
Changed prior to commit: https://reviews.llvm.org/D149625?vs=518782&id=522285#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149625/new/ https://reviews.llvm.org/D149625 Files: lldb/source/API/SBFileSpec.cpp Index: lldb/source/API/SBFileSpec.cpp =================================================================== --- lldb/source/API/SBFileSpec.cpp +++ lldb/source/API/SBFileSpec.cpp @@ -114,7 +114,9 @@ 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) {
Index: lldb/source/API/SBFileSpec.cpp =================================================================== --- lldb/source/API/SBFileSpec.cpp +++ lldb/source/API/SBFileSpec.cpp @@ -114,7 +114,9 @@ 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) {
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits