diff options
author | Zachary Turner <zturner@google.com> | 2017-03-07 03:43:17 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-03-07 03:43:17 +0000 |
commit | 990e3cd8e25970e477840d81972290858caffd50 (patch) | |
tree | 50278a2ce428ac02066aa7611cbe42cc89b11e6e /lldb/source/Commands/CommandObjectTarget.cpp | |
parent | 06ec03c2110e1a17271699a95ba28b0a56d9e17b (diff) | |
download | bcm5719-llvm-990e3cd8e25970e477840d81972290858caffd50.tar.gz bcm5719-llvm-990e3cd8e25970e477840d81972290858caffd50.zip |
Use LLVM for all stat-related functionality.
This deletes LLDB's FileType enumeration and replaces all
users, and all calls to functions that check whether a file
exists etc with corresponding calls to LLVM.
Differential Revision: https://reviews.llvm.org/D30624
llvm-svn: 297116
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 37dec184805..c8871c8de6e 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -50,6 +50,8 @@ #include "lldb/Target/Thread.h" #include "lldb/Target/ThreadSpec.h" +#include "llvm/Support/FileSystem.h" + // C Includes // C++ Includes #include <cerrno> @@ -4136,20 +4138,21 @@ protected: module_sp->SetSymbolFileFileSpec(FileSpec()); } + namespace fs = llvm::sys::fs; if (module_spec.GetUUID().IsValid()) { StreamString ss_symfile_uuid; module_spec.GetUUID().Dump(&ss_symfile_uuid); result.AppendErrorWithFormat( "symbol file '%s' (%s) does not match any existing module%s\n", symfile_path, ss_symfile_uuid.GetData(), - (symbol_fspec.GetFileType() != FileSpec::eFileTypeRegular) + !fs::is_regular_file(symbol_fspec.GetPath()) ? "\n please specify the full path to the symbol file" : ""); } else { result.AppendErrorWithFormat( "symbol file '%s' does not match any existing module%s\n", symfile_path, - (symbol_fspec.GetFileType() != FileSpec::eFileTypeRegular) + !fs::is_regular_file(symbol_fspec.GetPath()) ? "\n please specify the full path to the symbol file" : ""); } |