diff options
author | Zachary Turner <zturner@google.com> | 2016-03-22 17:58:09 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-03-22 17:58:09 +0000 |
commit | 190fadcdb245707011e31b69a24bd6bba7c93ab5 (patch) | |
tree | 4448dbd3327aa3e5244a448d70ceb1b7a2f45be1 /lldb/source/Commands | |
parent | 6feeb6554e271e308238750078b178ff1e83c15c (diff) | |
download | bcm5719-llvm-190fadcdb245707011e31b69a24bd6bba7c93ab5.tar.gz bcm5719-llvm-190fadcdb245707011e31b69a24bd6bba7c93ab5.zip |
Unicode support on Win32.
Win32 API calls that are Unicode aware require wide character
strings, but LLDB uses UTF8 everywhere. This patch does conversions
wherever necessary when passing strings into and out of Win32 API
calls.
Patch by Cameron
Differential Revision: http://reviews.llvm.org/D17107
Reviewed By: zturner, amccarth
llvm-svn: 264074
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r-- | lldb/source/Commands/CommandCompletions.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp index 919b18fdaef..dd0ecb4b82e 100644 --- a/lldb/source/Commands/CommandCompletions.cpp +++ b/lldb/source/Commands/CommandCompletions.cpp @@ -18,10 +18,11 @@ #include "llvm/ADT/SmallString.h" // Project includes -#include "lldb/Host/FileSpec.h" #include "lldb/Core/FileSpecList.h" -#include "lldb/Core/PluginManager.h" #include "lldb/Core/Module.h" +#include "lldb/Core/PluginManager.h" +#include "lldb/Host/FileSpec.h" +#include "lldb/Host/FileSystem.h" #include "lldb/Interpreter/Args.h" #include "lldb/Interpreter/CommandCompletions.h" #include "lldb/Interpreter/CommandInterpreter.h" @@ -31,6 +32,8 @@ #include "lldb/Target/Target.h" #include "lldb/Utility/CleanUp.h" +#include "llvm/ADT/SmallString.h" + using namespace lldb_private; CommandCompletions::CommonCompletionElement @@ -160,8 +163,7 @@ FileSpec::EnumerateDirectoryResult DiskFilesOrDirectoriesCallback(void *baton, F isa_directory = true; else if (file_type == FileSpec::eFileTypeSymbolicLink) { - struct stat stat_buf; - if ((stat(partial_name_copy, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode)) + if (FileSpec(partial_name_copy, false).IsDirectory()) isa_directory = true; } |