[llvm] 2bd97ba - [X86] LowerGlobalOrExternal - cleanup SDLoc. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 08:00:43 PDT 2024


Author: Simon Pilgrim
Date: 2024-05-13T16:00:23+01:00
New Revision: 2bd97ba390f9137f26eaf770a90c5f1cb72acbdb

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

LOG: [X86] LowerGlobalOrExternal - cleanup SDLoc. NFC.

Don't create a new local SDLoc and then take a reference to it, just create the SDLoc directly.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86ISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 0410cc33ca337..bbea2befdcc66 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -18559,7 +18559,7 @@ X86TargetLowering::LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const {
 SDValue X86TargetLowering::LowerGlobalOrExternal(SDValue Op, SelectionDAG &DAG,
                                                  bool ForCall) const {
   // Unpack the global address or external symbol.
-  const SDLoc &dl = SDLoc(Op);
+  SDLoc dl(Op);
   const GlobalValue *GV = nullptr;
   int64_t Offset = 0;
   const char *ExternalSym = nullptr;


        


More information about the llvm-commits mailing list