diff options
author | Chaoren Lin <chaorenl@google.com> | 2015-06-08 22:12:58 +0000 |
---|---|---|
committer | Chaoren Lin <chaorenl@google.com> | 2015-06-08 22:12:58 +0000 |
commit | 7d2f62dacc076d0ccff8ec91734895d0a088b0cc (patch) | |
tree | 8d939be8055f871a66cb60dba98303e7cb402a2e /lldb/source/API/SBFileSpec.cpp | |
parent | f0b1813fd35b54d5c082ae6e63b301dfe5fc4c0d (diff) | |
download | llvm-7d2f62dacc076d0ccff8ec91734895d0a088b0cc.zip llvm-7d2f62dacc076d0ccff8ec91734895d0a088b0cc.tar.gz llvm-7d2f62dacc076d0ccff8ec91734895d0a088b0cc.tar.bz2 |
Fix TestSymbolContext for remote Windows to Android.
Summary: Denormalize path returned by SBFileSpec::GetDirectory().
Reviewers: zturner, clayborg
Reviewed By: clayborg
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10298
llvm-svn: 239358
Diffstat (limited to 'lldb/source/API/SBFileSpec.cpp')
-rw-r--r-- | lldb/source/API/SBFileSpec.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/API/SBFileSpec.cpp b/lldb/source/API/SBFileSpec.cpp index 167b5f5..dd7435d 100644 --- a/lldb/source/API/SBFileSpec.cpp +++ b/lldb/source/API/SBFileSpec.cpp @@ -119,18 +119,19 @@ SBFileSpec::GetFilename() const const char * SBFileSpec::GetDirectory() const { - const char *s = m_opaque_ap->GetDirectory().AsCString(); + FileSpec directory{*m_opaque_ap}; + directory.GetFilename().Clear(); Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) { - if (s) + if (directory) log->Printf ("SBFileSpec(%p)::GetDirectory () => \"%s\"", - static_cast<void*>(m_opaque_ap.get()), s); + static_cast<void*>(m_opaque_ap.get()), directory.GetCString()); else log->Printf ("SBFileSpec(%p)::GetDirectory () => NULL", static_cast<void*>(m_opaque_ap.get())); } - return s; + return directory.GetCString(); } void |