aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOperand.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-12-03 21:12:06 -0800
committerFangrui Song <i@maskray.me>2024-12-03 21:12:06 -0800
commit932c5249ff6b3f31f3b67d944cf5ead156b5dd2c (patch)
tree5aa94b83c5f3319bd8439bf9a1aedb179f907faa /llvm/lib/CodeGen/MachineOperand.cpp
parent3e11ae69abd17a80759ae1d9565d555f6a869304 (diff)
downloadllvm-932c5249ff6b3f31f3b67d944cf5ead156b5dd2c.zip
llvm-932c5249ff6b3f31f3b67d944cf5ead156b5dd2c.tar.gz
llvm-932c5249ff6b3f31f3b67d944cf5ead156b5dd2c.tar.bz2
[CodeGen] Fix warning after #115531
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOperand.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp
index 18027b2..3a9bdde 100644
--- a/llvm/lib/CodeGen/MachineOperand.cpp
+++ b/llvm/lib/CodeGen/MachineOperand.cpp
@@ -909,8 +909,8 @@ void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST,
OS << printJumpTableEntryReference(getIndex());
break;
case MachineOperand::MO_GlobalAddress:
- if (const auto *GV = getGlobal())
- getGlobal()->printAsOperand(OS, /*PrintType=*/false, MST);
+ if (auto *GV = getGlobal())
+ GV->printAsOperand(OS, /*PrintType=*/false, MST);
else // Invalid, but may appear in debugging scenarios.
OS << "globaladdress(null)";