[llvm] r202935 - Remove unnecessary variables.

Ahmed Charles ahmedcharles at gmail.com
Tue Mar 4 21:04:01 PST 2014


Author: ace2001ac
Date: Tue Mar  4 23:04:00 2014
New Revision: 202935

URL: http://llvm.org/viewvc/llvm-project?rev=202935&view=rev
Log:
Remove unnecessary variables.

Found self-hosting clang-cl on windows. :)

Modified:
    llvm/trunk/lib/Support/Windows/Process.inc

Modified: llvm/trunk/lib/Support/Windows/Process.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Process.inc?rev=202935&r1=202934&r2=202935&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Process.inc (original)
+++ llvm/trunk/lib/Support/Windows/Process.inc Tue Mar  4 23:04:00 2014
@@ -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(St
 
   // 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());
 }





More information about the llvm-commits mailing list