[PATCH] D34254: [Dominators] Clean up typedefs in GenericDomTreeConstruction. NFC.

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 22:26:03 PDT 2017


kuhar added inline comments.


================
Comment at: include/llvm/Support/GenericDomTree.h:212
 /// various graphs in the LLVM IR or in the code generator.
-template <class NodeT> class DominatorTreeBase : public DominatorBase<NodeT> {
+template <class NodeT>
+class DominatorTreeBase : public DominatorBase<NodeT> {
----------------
dberlin wrote:
> Please don't mix reformatting changes with other ones, it makes it hard to tell what you did :)
> 
> You can use git clang-format or something if you want to format changed lines in a patch :)
> https://github.com/llvm-mirror/clang/blob/master/tools/clang-format/git-clang-format
> 
Thanks, I missed that


================
Comment at: include/llvm/Support/GenericDomTreeConstruction.h:146
                FuncT &F) {
-  typedef GraphTraits<NodeT> GraphT;
-  static_assert(std::is_pointer<typename GraphT::NodeRef>::value,
+  using GraphT = GraphTraits<NodeT>;
+  using NodePtr = typename GraphT::NodeRef;
----------------
dberlin wrote:
> If nodeptr is now the only place we use GraphT, just fold it into that line and remove it.
GraphT is used in a couple of places below.


Repository:
  rL LLVM

https://reviews.llvm.org/D34254





More information about the llvm-commits mailing list