diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
commit | f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch) | |
tree | 48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /source/API/SBHostOS.cpp | |
parent | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff) |
Notes
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 ( |