[llvm] 194897e - [ARM] Fix unused variable warning in Release builds

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 9 09:56:36 PST 2021


Author: Benjamin Kramer
Date: 2021-11-09T18:55:52+01:00
New Revision: 194897eccfdd3c0b83ea47586c93bf95976d356f

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

LOG: [ARM] Fix unused variable warning in Release builds

Added: 
    

Modified: 
    llvm/lib/Target/ARM/Thumb1InstrInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp b/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp
index b1d7b9a283e0..4b18f5e20d40 100644
--- a/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp
+++ b/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp
@@ -135,9 +135,8 @@ void Thumb1InstrInfo::expandLoadStackGuard(
     MachineBasicBlock::iterator MI) const {
   MachineFunction &MF = *MI->getParent()->getParent();
   const TargetMachine &TM = MF.getTarget();
-  Module &M = *MF.getFunction().getParent();
 
-  assert(M.getStackProtectorGuard() != "tls" &&
+  assert(MF.getFunction().getParent()->getStackProtectorGuard() != "tls" &&
          "TLS stack protector not supported for Thumb1 targets");
 
   if (TM.isPositionIndependent())


        


More information about the llvm-commits mailing list