aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-diff/DiffConsumer.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
commitcfca06d7963fa0909f90483b42a6d7d194d01e08 (patch)
tree209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/tools/llvm-diff/DiffConsumer.cpp
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'llvm/tools/llvm-diff/DiffConsumer.cpp')
-rw-r--r--llvm/tools/llvm-diff/DiffConsumer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/tools/llvm-diff/DiffConsumer.cpp b/llvm/tools/llvm-diff/DiffConsumer.cpp
index b797143bde1b..6228ff2bae98 100644
--- a/llvm/tools/llvm-diff/DiffConsumer.cpp
+++ b/llvm/tools/llvm-diff/DiffConsumer.cpp
@@ -50,15 +50,15 @@ void DiffConsumer::printValue(Value *V, bool isL) {
return;
}
if (V->getType()->isVoidTy()) {
- if (isa<StoreInst>(V)) {
+ if (auto *SI = dyn_cast<StoreInst>(V)) {
out << "store to ";
- printValue(cast<StoreInst>(V)->getPointerOperand(), isL);
- } else if (isa<CallInst>(V)) {
+ printValue(SI->getPointerOperand(), isL);
+ } else if (auto *CI = dyn_cast<CallInst>(V)) {
out << "call to ";
- printValue(cast<CallInst>(V)->getCalledValue(), isL);
- } else if (isa<InvokeInst>(V)) {
+ printValue(CI->getCalledOperand(), isL);
+ } else if (auto *II = dyn_cast<InvokeInst>(V)) {
out << "invoke to ";
- printValue(cast<InvokeInst>(V)->getCalledValue(), isL);
+ printValue(II->getCalledOperand(), isL);
} else {
out << *V;
}