There's no reason to create an entire new filespec to mutate and grab
data from when we can just grab the data directly.
Differential Revision: https://reviews.llvm.org/
D149625
const char *SBFileSpec::GetDirectory() const {
LLDB_INSTRUMENT_VA(this);
- FileSpec directory{*m_opaque_up};
- directory.ClearFilename();
- return directory.GetPathAsConstString().GetCString();
+ return m_opaque_up->GetDirectory().GetCString();
}
void SBFileSpec::SetFilename(const char *filename) {