diff options
author | Fangrui Song <i@maskray.me> | 2024-12-03 21:12:06 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-12-03 21:12:06 -0800 |
commit | 932c5249ff6b3f31f3b67d944cf5ead156b5dd2c (patch) | |
tree | 5aa94b83c5f3319bd8439bf9a1aedb179f907faa /llvm/lib/CodeGen/MachineOperand.cpp | |
parent | 3e11ae69abd17a80759ae1d9565d555f6a869304 (diff) | |
download | llvm-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.cpp | 4 |
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)"; |