summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/FunctionComparator.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2018-10-15 10:04:59 +0000
committerChandler Carruth <chandlerc@gmail.com>2018-10-15 10:04:59 +0000
commitedb12a838a22f212d7bee970ff637192f7ea8576 (patch)
treeb8ceecb3e12339436c13c2fb2e84ffc813ce8224 /llvm/lib/Transforms/Utils/FunctionComparator.cpp
parentae98759ec5634759f15fe103b0c637e6f836829f (diff)
downloadbcm5719-llvm-edb12a838a22f212d7bee970ff637192f7ea8576.tar.gz
bcm5719-llvm-edb12a838a22f212d7bee970ff637192f7ea8576.zip
[TI removal] Make variables declared as `TerminatorInst` and initialized
by `getTerminator()` calls instead be declared as `Instruction`. This is the biggest remaining chunk of the usage of `getTerminator()` that insists on the narrow type and so is an easy batch of updates. Several files saw more extensive updates where this would cascade to requiring API updates within the file to use `Instruction` instead of `TerminatorInst`. All of these were trivial in nature (pervasively using `Instruction` instead just worked). llvm-svn: 344502
Diffstat (limited to 'llvm/lib/Transforms/Utils/FunctionComparator.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/FunctionComparator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/FunctionComparator.cpp b/llvm/lib/Transforms/Utils/FunctionComparator.cpp
index 69203f9f248..ef991d715fd 100644
--- a/llvm/lib/Transforms/Utils/FunctionComparator.cpp
+++ b/llvm/lib/Transforms/Utils/FunctionComparator.cpp
@@ -867,8 +867,8 @@ int FunctionComparator::compare() {
if (int Res = cmpBasicBlocks(BBL, BBR))
return Res;
- const TerminatorInst *TermL = BBL->getTerminator();
- const TerminatorInst *TermR = BBR->getTerminator();
+ const Instruction *TermL = BBL->getTerminator();
+ const Instruction *TermR = BBR->getTerminator();
assert(TermL->getNumSuccessors() == TermR->getNumSuccessors());
for (unsigned i = 0, e = TermL->getNumSuccessors(); i != e; ++i) {
@@ -938,7 +938,7 @@ FunctionComparator::FunctionHash FunctionComparator::functionHash(Function &F) {
for (auto &Inst : *BB) {
H.add(Inst.getOpcode());
}
- const TerminatorInst *Term = BB->getTerminator();
+ const Instruction *Term = BB->getTerminator();
for (unsigned i = 0, e = Term->getNumSuccessors(); i != e; ++i) {
if (!VisitedBBs.insert(Term->getSuccessor(i)).second)
continue;
OpenPOWER on IntegriCloud