[llvm] 223a210 - [AArch64] Fix unused variable in release builds. NFC.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 00:46:20 PDT 2024


Author: Benjamin Kramer
Date: 2024-06-27T09:45:52+02:00
New Revision: 223a2102fe312f442f9b55a8bafa909e03b0f4ed

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

LOG: [AArch64] Fix unused variable in release builds. NFC.

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index b820a850cd467..3e96512777e1c 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -9555,8 +9555,7 @@ SDValue AArch64TargetLowering::LowerPtrAuthGlobalAddressStatically(
     SDValue TGA, SDLoc DL, EVT VT, AArch64PACKey::ID KeyC,
     SDValue Discriminator, SDValue AddrDiscriminator, SelectionDAG &DAG) const {
   const auto *TGN = cast<GlobalAddressSDNode>(TGA.getNode());
-  const GlobalValue *GV = TGN->getGlobal();
-  assert(GV->hasExternalWeakLinkage());
+  assert(TGN->getGlobal()->hasExternalWeakLinkage());
 
   // Offsets and extern_weak don't mix well: ptrauth aside, you'd get the
   // offset alone as a pointer if the symbol wasn't available, which would


        


More information about the llvm-commits mailing list