diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-31 21:22:58 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-31 21:22:58 +0000 |
commit | 5ffd83dbcc34f10e07f6d3e968ae6365869615f4 (patch) | |
tree | 0e9f5cf729dde39f949698fddef45a34e2bc7f44 /contrib/llvm-project/llvm/tools/llvm-diff/DiffConsumer.cpp | |
parent | 1799696096df87b52968b8996d00c91e0a5de8d9 (diff) | |
parent | cfca06d7963fa0909f90483b42a6d7d194d01e08 (diff) |
Notes
Diffstat (limited to 'contrib/llvm-project/llvm/tools/llvm-diff/DiffConsumer.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/tools/llvm-diff/DiffConsumer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/llvm-project/llvm/tools/llvm-diff/DiffConsumer.cpp b/contrib/llvm-project/llvm/tools/llvm-diff/DiffConsumer.cpp index b797143bde1b..6228ff2bae98 100644 --- a/contrib/llvm-project/llvm/tools/llvm-diff/DiffConsumer.cpp +++ b/contrib/llvm-project/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; } |