[IR] Replace `isa<TerminatorInst>` with `isTerminator()`.
This is a bit awkward in a handful of places where we didn't even have
an instruction and now we have to see if we can build one. But on the
whole, this seems like a win and at worst a reasonable cost for removing
`TerminatorInst`.
All of this is part of the removal of `TerminatorInst` from the
`Instruction` type hierarchy.
llvm-svn: 340701
diff --git a/llvm/unittests/Transforms/Utils/Local.cpp b/llvm/unittests/Transforms/Utils/Local.cpp
index bb36d01..9dc920d 100644
--- a/llvm/unittests/Transforms/Utils/Local.cpp
+++ b/llvm/unittests/Transforms/Utils/Local.cpp
@@ -552,7 +552,7 @@
auto DI = dyn_cast<DbgValueInst>(&I);
if (!DI) {
// The function should only contain debug values and a terminator.
- ASSERT_TRUE(isa<TerminatorInst>(&I));
+ ASSERT_TRUE(I.isTerminator());
continue;
}
EXPECT_EQ(DI->getVariable()->getName(), "x");