mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-26 05:56:51 +00:00
Remove unnecessary variables.
Found self-hosting clang-cl on windows. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202935 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a9b2552fd9
commit
c75dc7412b
@ -154,7 +154,7 @@ void Process::PreventCoreFiles() {
|
||||
Optional<std::string> Process::GetEnv(StringRef Name) {
|
||||
// Convert the argument to UTF-16 to pass it to _wgetenv().
|
||||
SmallVector<wchar_t, 128> NameUTF16;
|
||||
if (error_code ec = windows::UTF8ToUTF16(Name, NameUTF16))
|
||||
if (windows::UTF8ToUTF16(Name, NameUTF16))
|
||||
return None;
|
||||
|
||||
// Environment variable can be encoded in non-UTF8 encoding, and there's no
|
||||
@ -175,7 +175,7 @@ Optional<std::string> Process::GetEnv(StringRef Name) {
|
||||
|
||||
// Convert the result from UTF-16 to UTF-8.
|
||||
SmallVector<char, MAX_PATH> Res;
|
||||
if (error_code ec = windows::UTF16ToUTF8(Buf.data(), Size, Res))
|
||||
if (windows::UTF16ToUTF8(Buf.data(), Size, Res))
|
||||
return None;
|
||||
return std::string(Res.data());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user