diff options
author | Jim Ingham <jingham@apple.com> | 2014-08-07 22:37:43 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2014-08-07 22:37:43 +0000 |
commit | e1d263eefc6a7dd87b7b5a7c2e30ce57712d5261 (patch) | |
tree | 1f30a4f0ce556c757d231c0c4a9a417c0b38fdb9 /lldb/source | |
parent | 7fa8b17e4f49da61290ac3d7a152b52873b72a61 (diff) | |
download | bcm5719-llvm-e1d263eefc6a7dd87b7b5a7c2e30ce57712d5261.tar.gz bcm5719-llvm-e1d263eefc6a7dd87b7b5a7c2e30ce57712d5261.zip |
r215124 missed a few Mac OS X only uses of FileSpec::Resolve, fixing to match
the new signature.
llvm-svn: 215159
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Host/common/Host.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index c469ead2be6..4da5a5ee2d6 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -1180,7 +1180,6 @@ Host::GetLLDBPath (PathType path_type, FileSpec &file_spec) if (GetLLDBPath (ePathTypeLLDBShlibDir, lldb_file_spec)) { char raw_path[PATH_MAX]; - char resolved_path[PATH_MAX]; lldb_file_spec.GetPath(raw_path, sizeof(raw_path)); char *framework_pos = ::strstr (raw_path, "LLDB.framework"); @@ -1189,8 +1188,9 @@ Host::GetLLDBPath (PathType path_type, FileSpec &file_spec) framework_pos += strlen("LLDB.framework"); ::strncpy (framework_pos, "/Headers", PATH_MAX - (framework_pos - raw_path)); } - FileSpec::Resolve (raw_path, resolved_path, sizeof(resolved_path)); - g_lldb_headers_dir.SetCString(resolved_path); + llvm::SmallString<64> resolved_path(raw_path); + FileSpec::Resolve (resolved_path); + g_lldb_headers_dir.SetCString(resolved_path.c_str()); } #else // TODO: Anyone know how we can determine this for linux? Other systems?? @@ -1275,7 +1275,6 @@ Host::GetLLDBPath (PathType path_type, FileSpec &file_spec) if (GetLLDBPath (ePathTypeLLDBShlibDir, lldb_file_spec)) { char raw_path[PATH_MAX]; - char resolved_path[PATH_MAX]; lldb_file_spec.GetPath(raw_path, sizeof(raw_path)); char *framework_pos = ::strstr (raw_path, "LLDB.framework"); @@ -1283,8 +1282,9 @@ Host::GetLLDBPath (PathType path_type, FileSpec &file_spec) { framework_pos += strlen("LLDB.framework"); ::strncpy (framework_pos, "/Resources/PlugIns", PATH_MAX - (framework_pos - raw_path)); - FileSpec::Resolve (raw_path, resolved_path, sizeof(resolved_path)); - g_lldb_system_plugin_dir.SetCString(resolved_path); + llvm::SmallString<64> resolved_path(raw_path); + FileSpec::Resolve (resolved_path); + g_lldb_system_plugin_dir.SetCString(resolved_path.c_str()); } return false; } @@ -1319,12 +1319,11 @@ Host::GetLLDBPath (PathType path_type, FileSpec &file_spec) static ConstString g_lldb_user_plugin_dir; if (!g_lldb_user_plugin_dir) { - char user_plugin_path[PATH_MAX]; - if (FileSpec::Resolve ("~/Library/Application Support/LLDB/PlugIns", - user_plugin_path, - sizeof(user_plugin_path))) + llvm::SmallString<64> user_plugin_path("~/Library/Application Support/LLDB/PlugIns"); + FileSpec::Resolve (user_plugin_path); + if (user_plugin_path.size()) { - g_lldb_user_plugin_dir.SetCString(user_plugin_path); + g_lldb_user_plugin_dir.SetCString(user_plugin_path.c_str()); } } file_spec.GetDirectory() = g_lldb_user_plugin_dir; |