[llvm] [SelectionDAG] Fix "unused variable" warnings after #119268 (NFC) (PR #119550)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 04:11:16 PST 2024


https://github.com/s-barannikov created https://github.com/llvm/llvm-project/pull/119550

None

>From e3c21b963a40b36826bf1eedaaa112e7f53044f8 Mon Sep 17 00:00:00 2001
From: Sergei Barannikov <barannikov88 at gmail.com>
Date: Wed, 11 Dec 2024 15:10:23 +0300
Subject: [PATCH] [SelectionDAG] Fix "unused variable" warnings after #119268
 (NFC)

---
 llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 2464b57187b9c8..f8d7c3ef7bbe71 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -2195,7 +2195,6 @@ void SelectionDAGBuilder::visitRet(const ReturnInst &I) {
 
   if (!FuncInfo.CanLowerReturn) {
     Register DemoteReg = FuncInfo.DemoteRegister;
-    const Function *F = I.getParent()->getParent();
 
     // Emit a store of the return value through the virtual register.
     // Leave Outs empty so that LowerReturn won't try to load return
@@ -10980,7 +10979,6 @@ std::pair<SDValue, SDValue>
 TargetLowering::LowerCallTo(TargetLowering::CallLoweringInfo &CLI) const {
   // Handle the incoming return values from the call.
   CLI.Ins.clear();
-  Type *OrigRetTy = CLI.RetTy;
   SmallVector<EVT, 4> RetTys;
   SmallVector<TypeSize, 4> Offsets;
   auto &DL = CLI.DAG.getDataLayout();



More information about the llvm-commits mailing list