llvm/bolt/include/bolt/Core/BinaryDomTree.h

//==- bolt/Core/BinaryDomTree.h - Dominator Tree at low-level IR -*- C++ -*-==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file defines the BinaryDomTree class, which represents a dominator tree
// in the CFG of a binary function.
//
//===----------------------------------------------------------------------===//

#ifndef BOLT_CORE_BINARY_DOMTREE_H
#define BOLT_CORE_BINARY_DOMTREE_H

#include "bolt/Core/BinaryBasicBlock.h"
#include "llvm/IR/Dominators.h"

namespace llvm {
namespace bolt {

BinaryDomTreeNode;
BinaryDominatorTree;

} // namespace bolt

// BinaryDominatorTree GraphTraits specializations.
template <>
struct GraphTraits<bolt::BinaryDomTreeNode *>
    : public DomTreeGraphTraitsBase<bolt::BinaryDomTreeNode,
                                    bolt::BinaryDomTreeNode::iterator> {};

template <>
struct GraphTraits<const bolt::BinaryDomTreeNode *>
    : public DomTreeGraphTraitsBase<const bolt::BinaryDomTreeNode,
                                    bolt::BinaryDomTreeNode::const_iterator> {};

template <>
struct GraphTraits<bolt::BinaryDominatorTree *>
    : public GraphTraits<bolt::BinaryDomTreeNode *> {};

} // namespace llvm

#endif