[llvm] 04d59f2 - [IR] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 10:21:17 PST 2023
Author: Kazu Hirata
Date: 2023-02-17T10:21:10-08:00
New Revision: 04d59f2ab3a86c6a9a61429e76856391a97e965a
URL: https://github.com/llvm/llvm-project/commit/04d59f2ab3a86c6a9a61429e76856391a97e965a
DIFF: https://github.com/llvm/llvm-project/commit/04d59f2ab3a86c6a9a61429e76856391a97e965a.diff
LOG: [IR] Fix a warning
This patch fixes:
llvm/lib/IR/Instruction.cpp:141:20: warning: unused variable ‘CB’ [-Wunused-variable]
Added:
Modified:
llvm/lib/IR/Instruction.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/Instruction.cpp b/llvm/lib/IR/Instruction.cpp
index fc4e5d4433d1b..38cce828b9baf 100644
--- a/llvm/lib/IR/Instruction.cpp
+++ b/llvm/lib/IR/Instruction.cpp
@@ -138,7 +138,7 @@ Instruction *Instruction::getInsertionPointAfterDef() {
} else if (auto *II = dyn_cast<InvokeInst>(this)) {
InsertBB = II->getNormalDest();
InsertPt = InsertBB->getFirstInsertionPt();
- } else if (auto *CB = dyn_cast<CallBrInst>(this)) {
+ } else if (isa<CallBrInst>(this)) {
// Def is available in multiple successors, there's no single dominating
// insertion point.
return nullptr;
More information about the llvm-commits
mailing list