aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-11-10 07:24:06 -0800
committerGitHub <noreply@github.com>2024-11-10 07:24:06 -0800
commit5b19ed8bb4a36bd0b96f18151932aebd7a67f0e1 (patch)
tree46fc2dc5bcd221a467a8697d1f6003d0430e6325 /llvm/lib/IR/DebugInfo.cpp
parent91a48e06463b23679907e151bdfec3e6093e9f16 (diff)
downloadllvm-5b19ed8bb4a36bd0b96f18151932aebd7a67f0e1.zip
llvm-5b19ed8bb4a36bd0b96f18151932aebd7a67f0e1.tar.gz
llvm-5b19ed8bb4a36bd0b96f18151932aebd7a67f0e1.tar.bz2
[llvm] Migrate away from PointerUnion::{is,get,dyn_cast} (NFC) (#115626)
Note that PointerUnion::{is,get,dyn_cast} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with // isa<T>, cast<T> and the llvm::dyn_cast<T>
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index e20a0f0..e5b45e0 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -2099,10 +2099,10 @@ static void emitDbgAssign(AssignmentInfo Info, Value *Val, Value *Dest,
AddrExpr, VarRec.DL);
(void)Assign;
LLVM_DEBUG(if (!Assign.isNull()) {
- if (Assign.is<DbgRecord *>())
- errs() << " > INSERT: " << *Assign.get<DbgRecord *>() << "\n";
+ if (const auto *Record = dyn_cast<DbgRecord *>(Assign))
+ errs() << " > INSERT: " << *Record << "\n";
else
- errs() << " > INSERT: " << *Assign.get<Instruction *>() << "\n";
+ errs() << " > INSERT: " << *cast<Instruction *>(Assign) << "\n";
});
}