summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/DominatorTreeTest.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <florian.hahn@arm.com>2018-06-16 14:47:05 +0000
committerFlorian Hahn <florian.hahn@arm.com>2018-06-16 14:47:05 +0000
commit6fbad9040701e84ede8fc33293aa24e2f0ecf34c (patch)
tree985c8789cf31c821dd1e55798d8337a35f233106 /llvm/unittests/IR/DominatorTreeTest.cpp
parente7f703804d7dadbd57cf7c50f479324d012f09e7 (diff)
downloadbcm5719-llvm-6fbad9040701e84ede8fc33293aa24e2f0ecf34c.tar.gz
bcm5719-llvm-6fbad9040701e84ede8fc33293aa24e2f0ecf34c.zip
[Dominators] Change getNode parameter type to const NodeT * (NFC).
DominatorTreeBase::getNode does not modify its parameter and this change allows callers that only have access to const pointers to use it without casting. Reviewers: kuhar, dblaikie, chandlerc Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D48231 llvm-svn: 334892
Diffstat (limited to 'llvm/unittests/IR/DominatorTreeTest.cpp')
-rw-r--r--llvm/unittests/IR/DominatorTreeTest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/unittests/IR/DominatorTreeTest.cpp b/llvm/unittests/IR/DominatorTreeTest.cpp
index 475b5b2232c..cf81623d0d1 100644
--- a/llvm/unittests/IR/DominatorTreeTest.cpp
+++ b/llvm/unittests/IR/DominatorTreeTest.cpp
@@ -776,7 +776,9 @@ TEST(DominatorTree, InsertFromUnreachable) {
PDT.insertEdge(From, To);
EXPECT_TRUE(PDT.verify());
EXPECT_TRUE(PDT.getRoots().size() == 2);
- EXPECT_NE(PDT.getNode(B.getOrAddBlock("5")), nullptr);
+ // Make sure we can use a const pointer with getNode.
+ const BasicBlock *BB5 = B.getOrAddBlock("5");
+ EXPECT_NE(PDT.getNode(BB5), nullptr);
}
TEST(DominatorTree, InsertMixed) {
OpenPOWER on IntegriCloud