[lld] 5022511 - [lld-link] Fix -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off build. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 20 11:35:13 PDT 2021


Author: Fangrui Song
Date: 2021-06-20T11:35:02-07:00
New Revision: 50225112b56a087f84ceed94a41f96f1d1f893cc

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

LOG: [lld-link] Fix -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off build. NFC

Added: 
    

Modified: 
    lld/COFF/Writer.cpp

Removed: 
    


################################################################################
diff  --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp
index 422a85c076386..7a85ecbd456a8 100644
--- a/lld/COFF/Writer.cpp
+++ b/lld/COFF/Writer.cpp
@@ -595,6 +595,7 @@ void Writer::finalizeAddresses() {
     // If the verification above thought we needed thunks, we should have
     // added some.
     assert(addressesChanged);
+    (void)addressesChanged;
 
     // Recalculate the layout for the whole image (and verify the ranges at
     // the start of the next round).


        


More information about the llvm-commits mailing list