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
This commit is contained in:
Zachary Turner
2016-03-22 17:58:09 +00:00
parent 6feeb6554e
commit 190fadcdb2
29 changed files with 538 additions and 234 deletions

View File

@@ -19,8 +19,11 @@
#include "lldb/Core/Stream.h"
#include "lldb/Host/File.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Interpreter/ScriptInterpreter.h"
#include "llvm/Support/ConvertUTF.h"
#include <stdio.h>
#include "llvm/ADT/StringSwitch.h"
@@ -1162,9 +1165,7 @@ PythonFile::PythonFile(File &file, const char *mode)
PythonFile::PythonFile(const char *path, const char *mode)
{
FILE *fp = nullptr;
fp = fopen(path, mode);
lldb_private::File file(fp, true);
lldb_private::File file(path, GetOptionsFromMode(mode));
Reset(file, mode);
}