llvm/clang/include/clang/AST/TypeOrdering.h

//===-------------- TypeOrdering.h - Total ordering for types ---*- 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
//
//===----------------------------------------------------------------------===//
///
/// \file
/// Allows QualTypes to be sorted and hence used in maps and sets.
///
/// Defines clang::QualTypeOrdering, a total ordering on clang::QualType,
/// and hence enables QualType values to be sorted and to be used in
/// std::maps, std::sets, llvm::DenseMaps, and llvm::DenseSets.
///
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_AST_TYPEORDERING_H
#define LLVM_CLANG_AST_TYPEORDERING_H

#include "clang/AST/CanonicalType.h"
#include "clang/AST/Type.h"
#include <functional>

namespace clang {

/// Function object that provides a total ordering on QualType values.
struct QualTypeOrdering {};

}

namespace llvm {

  template<> struct DenseMapInfo<clang::QualType> {};

  template<> struct DenseMapInfo<clang::CanQualType> {};
}

#endif