[PATCH] D48231: [Dominators] Change getNode parameter type to const NodeT * (NFC).
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 15 12:25:41 PDT 2018
fhahn created this revision.
fhahn added reviewers: kuhar, dblaikie, chandlerc.
fhahn added a subscriber: sdesmalen.
DominatorTreeBase::getNode does not modify its parameter and this change
allows callers that only have access to const pointers to use it without
casting.
https://reviews.llvm.org/D48231
Files:
include/llvm/Support/GenericDomTree.h
Index: include/llvm/Support/GenericDomTree.h
===================================================================
--- include/llvm/Support/GenericDomTree.h
+++ include/llvm/Support/GenericDomTree.h
@@ -351,7 +351,7 @@
/// block. This is the same as using operator[] on this class. The result
/// may (but is not required to) be null for a forward (backwards)
/// statically unreachable block.
- DomTreeNodeBase<NodeT> *getNode(NodeT *BB) const {
+ DomTreeNodeBase<NodeT> *getNode(const NodeT *BB) const {
auto I = DomTreeNodes.find(BB);
if (I != DomTreeNodes.end())
return I->second.get();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48231.151540.patch
Type: text/x-patch
Size: 619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180615/cbc7a8e1/attachment.bin>
More information about the llvm-commits
mailing list