[llvm-branch-commits] [llvm] 36e62b1 - [AArch64] Fix -Wunused-but-set-variable in GCC -DLLVM_ENABLE_ASSERTIONS=off build

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jan 20 10:19:07 PST 2021


Author: Fangrui Song
Date: 2021-01-20T10:14:11-08:00
New Revision: 36e62b1ff7e7aa883f8ea2f236e9c04df6976b59

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

LOG: [AArch64] Fix -Wunused-but-set-variable in GCC -DLLVM_ENABLE_ASSERTIONS=off build

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
index 0021456a596d..9619bb43ae9c 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
@@ -865,6 +865,7 @@ static bool selectCopy(MachineInstr &I, const TargetInstrInfo &TII,
 #ifndef NDEBUG
     ValidCopy = KnownValid || isValidCopy(I, DstRegBank, MRI, TRI, RBI);
     assert(ValidCopy && "Invalid copy.");
+    (void)KnownValid;
 #endif
     return ValidCopy;
   };


        


More information about the llvm-branch-commits mailing list