diff options
Diffstat (limited to 'source/API/SBHostOS.cpp')
-rw-r--r-- | source/API/SBHostOS.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/API/SBHostOS.cpp b/source/API/SBHostOS.cpp index 008ca4d9672ee..6c172997bdc81 100644 --- a/source/API/SBHostOS.cpp +++ b/source/API/SBHostOS.cpp @@ -17,6 +17,9 @@ #include "lldb/Host/HostThread.h" #include "lldb/Host/ThreadLauncher.h" +#include "llvm/Support/Path.h" +#include "llvm/ADT/SmallString.h" + using namespace lldb; using namespace lldb_private; @@ -53,6 +56,19 @@ SBHostOS::GetLLDBPath (lldb::PathType path_type) return sb_fspec; } +SBFileSpec +SBHostOS::GetUserHomeDirectory () +{ + SBFileSpec sb_fspec; + + llvm::SmallString<64> home_dir_path; + llvm::sys::path::home_directory (home_dir_path); + FileSpec homedir (home_dir_path.c_str(), true); + + sb_fspec.SetFileSpec (homedir); + return sb_fspec; +} + lldb::thread_t SBHostOS::ThreadCreate ( |