[llvm] e691b30 - Fix unused-variable warning

Brian Cain via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 09:56:14 PST 2020


Author: Brian Cain
Date: 2020-03-02T11:55:53-06:00
New Revision: e691b3015c64648cc8d8255284e1c63ad1038f77

URL: https://github.com/llvm/llvm-project/commit/e691b3015c64648cc8d8255284e1c63ad1038f77
DIFF: https://github.com/llvm/llvm-project/commit/e691b3015c64648cc8d8255284e1c63ad1038f77.diff

LOG: Fix unused-variable warning

Added: 
    

Modified: 
    llvm/lib/Support/FileUtilities.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/FileUtilities.cpp b/llvm/lib/Support/FileUtilities.cpp
index d11fbb54dc0d..b95f92c86e99 100644
--- a/llvm/lib/Support/FileUtilities.cpp
+++ b/llvm/lib/Support/FileUtilities.cpp
@@ -318,9 +318,8 @@ llvm::Error llvm::writeFileAtomically(
         atomic_write_error::output_stream_error);
   }
 
-  if (const std::error_code Error =
-          sys::fs::rename(/*from=*/GeneratedUniqPath.c_str(),
-                          /*to=*/FinalPath.str().c_str())) {
+  if (sys::fs::rename(/*from=*/GeneratedUniqPath.c_str(),
+                      /*to=*/FinalPath.str().c_str())) {
     return llvm::make_error<AtomicFileWriteError>(
         atomic_write_error::failed_to_rename_temp_file);
   }


        


More information about the llvm-commits mailing list