llvm/llvm/unittests/Support/GenericDomTreeTest.cpp

//===- unittests/Support/GenericDomTreeTest.cpp - GenericDomTree.h tests --===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "llvm/Support/GenericDomTree.h"
#include "llvm/ADT/GraphTraits.h"
#include "llvm/Support/DataTypes.h"
#include "gtest/gtest.h"
usingnamespacellvm;

namespace {

// Very simple (fake) graph structure to test dominator tree on.
struct NumberedGraph;

struct NumberedNode {};

struct NumberedGraph {};
} // namespace

namespace llvm {
template <> struct GraphTraits<NumberedNode *> {};

template <> struct GraphTraits<const NumberedNode *> {};

template <> struct GraphTraits<NumberedGraph *> {};

namespace DomTreeBuilder {
// Dummy specialization. Only needed so that we can call recalculate(), which
// sets DT.Parent -- but we can't access DT.Parent here.
template <> void Calculate(DomTreeBase<NumberedNode> &DT) {}
} // end namespace DomTreeBuilder
} // end namespace llvm

namespace {

TEST(GenericDomTree, BlockNumbers) {}

} // namespace