From b6414b570f051d9e4d1334ec9aaa345cbffabaf1 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 5 Jun 2025 01:02:38 -0700 Subject: [PATCH] Xtensa: Fix clang lifetime warning --- llvm/lib/Target/Xtensa/XtensaISelDAGToDAG.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Target/Xtensa/XtensaISelDAGToDAG.cpp b/llvm/lib/Target/Xtensa/XtensaISelDAGToDAG.cpp index 06cccd4831bf..959553de9939 100644 --- a/llvm/lib/Target/Xtensa/XtensaISelDAGToDAG.cpp +++ b/llvm/lib/Target/Xtensa/XtensaISelDAGToDAG.cpp @@ -59,10 +59,9 @@ public: } if (TM.isPositionIndependent()) { - DiagnosticInfoUnsupported Diag(CurDAG->getMachineFunction().getFunction(), - "PIC relocations are not supported ", - Addr.getDebugLoc()); - CurDAG->getContext()->diagnose(Diag); + CurDAG->getContext()->diagnose(DiagnosticInfoUnsupported( + CurDAG->getMachineFunction().getFunction(), + "PIC relocations are not supported", Addr.getDebugLoc())); } if ((Addr.getOpcode() == ISD::TargetExternalSymbol ||