diff options
| author | Pavel Labath <labath@google.com> | 2017-03-13 09:46:15 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2017-03-13 09:46:15 +0000 |
| commit | 9bd69ad9b8c07665e14f4affc373d65e4423ff98 (patch) | |
| tree | ad7ddc778bbdbe3d29eb3de35e7735c8cbe5d9e8 /lldb/source/Host/common/FileSpec.cpp | |
| parent | aea3a990a27a568dce95d4294cfce75f48400dce (diff) | |
| download | bcm5719-llvm-9bd69ad9b8c07665e14f4affc373d65e4423ff98.tar.gz bcm5719-llvm-9bd69ad9b8c07665e14f4affc373d65e4423ff98.zip | |
Fix Linux build for the FileSpec changes
Propagate changes that were made during review, and fix a couple of
warnings while I'm in there.
llvm-svn: 297609
Diffstat (limited to 'lldb/source/Host/common/FileSpec.cpp')
| -rw-r--r-- | lldb/source/Host/common/FileSpec.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp index bb96375801e..ddb98401e24 100644 --- a/lldb/source/Host/common/FileSpec.cpp +++ b/lldb/source/Host/common/FileSpec.cpp @@ -651,11 +651,8 @@ bool FileSpec::ResolvePath() { if (m_is_resolved) return true; // We have already resolved this path - char path_buf[PATH_MAX]; - if (!GetPath(path_buf, PATH_MAX, false)) - return false; // SetFile(...) will set m_is_resolved correctly if it can resolve the path - SetFile(path_buf, true); + SetFile(GetPath(false), true); return m_is_resolved; } @@ -779,7 +776,7 @@ void FileSpec::EnumerateDirectory(llvm::StringRef dir_path, for (; Iter != End && !EC; Iter.increment(EC)) { const auto &Item = *Iter; fs::file_status Status; - if (EC = Item.status(Status)) + if ((EC = Item.status(Status))) break; if (!find_files && fs::is_regular_file(Status)) continue; |

