9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H 10 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H 14 #include "clang/Index/IndexSymbol.h" 15 #include "llvm/ADT/iterator_range.h" 35 return std::tie(Subject, Predicate, Object) ==
40 return std::tie(Subject, Predicate, Object) <
57 size_t size()
const {
return Relations.size(); }
58 bool empty()
const {
return Relations.empty(); }
61 return sizeof(*this) +
sizeof(
value_type) * Relations.capacity();
79 std::vector<Relation> Relations;
84 : Relations(std::move(Relations)) {}
86 std::vector<Relation> Relations;
92 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H
bool operator==(const Relation &Other) const
Represents a relation between two symbols.
std::vector< value_type >::const_iterator const_iterator
const_iterator end() const
std::vector< std::string > lookup(const SymbolIndex &I, llvm::ArrayRef< SymbolID > IDs)
bool operator<(const Relation &Other) const
const_iterator begin() const
void insert(const Relation &R)
Adds a relation to the slab.
RelationSlab::Builder is a mutable container that can 'freeze' to RelationSlab.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//