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

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 19:11:05 PDT 2017


dberlin 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> {
----------------
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



================
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;
----------------
If nodeptr is now the only place we use GraphT, just fold it into that line and remove it.


Repository:
  rL LLVM

https://reviews.llvm.org/D34254





More information about the llvm-commits mailing list