[PATCH] Remove unnecessary variables.
Ahmed Charles
acharles at outlook.com
Tue Mar 4 20:21:05 PST 2014
Hi dblaikie,
Found self-hosting clang-cl on windows. :)
http://llvm-reviews.chandlerc.com/D2957
Files:
lib/Support/Windows/Process.inc
Index: lib/Support/Windows/Process.inc
===================================================================
--- lib/Support/Windows/Process.inc
+++ lib/Support/Windows/Process.inc
@@ -154,7 +154,7 @@
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 @@
// 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());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2957.1.patch
Type: text/x-patch
Size: 847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140304/6892b8ef/attachment.bin>
More information about the llvm-commits
mailing list