aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/IR/DominatorTreeTest.cpp
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2020-05-18 16:28:28 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2020-07-06 21:58:11 +0200
commitdfcc68c528269a3e0b1cbe7ef22cc92cdfdf7eba (patch)
tree15eb03545a01e98e65badc79a9e4224c056a635e /llvm/unittests/IR/DominatorTreeTest.cpp
parent723a44c9b5d654ec791720fc450757ae00f9e631 (diff)
downloadllvm-dfcc68c528269a3e0b1cbe7ef22cc92cdfdf7eba.zip
llvm-dfcc68c528269a3e0b1cbe7ef22cc92cdfdf7eba.tar.gz
llvm-dfcc68c528269a3e0b1cbe7ef22cc92cdfdf7eba.tar.bz2
DomTree: Remove getRoots() accessor
Summary: Avoid exposing details about how roots are stored. This enables subsequent type-erasure changes. v5: - cleanup a unit test by using EXPECT_EQ instead of EXPECT_TRUE Change-Id: I532b774cc71f2224e543bc7d79131d97f63f093d Reviewers: arsenm, RKSimon, mehdi_amini, courbet Subscribers: jvesely, wdng, hiraditya, kuhar, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83085
Diffstat (limited to 'llvm/unittests/IR/DominatorTreeTest.cpp')
-rw-r--r--llvm/unittests/IR/DominatorTreeTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/IR/DominatorTreeTest.cpp b/llvm/unittests/IR/DominatorTreeTest.cpp
index 66e1227..16c12b2 100644
--- a/llvm/unittests/IR/DominatorTreeTest.cpp
+++ b/llvm/unittests/IR/DominatorTreeTest.cpp
@@ -805,7 +805,7 @@ TEST(DominatorTree, InsertFromUnreachable) {
BasicBlock *To = B.getOrAddBlock(LastUpdate->Edge.To);
PDT.insertEdge(From, To);
EXPECT_TRUE(PDT.verify());
- EXPECT_TRUE(PDT.getRoots().size() == 2);
+ EXPECT_EQ(PDT.root_size(), 2);
// Make sure we can use a const pointer with getNode.
const BasicBlock *BB5 = B.getOrAddBlock("5");
EXPECT_NE(PDT.getNode(BB5), nullptr);