18#ifndef LLVM_CLANG_ANALYSIS_SCALABLE_MODEL_BUILDNAMESPACE_H
19#define LLVM_CLANG_ANALYSIS_SCALABLE_MODEL_BUILDNAMESPACE_H
21#include "llvm/ADT/STLExtras.h"
22#include "llvm/ADT/StringRef.h"
31llvm::StringRef
toString(BuildNamespaceKind BNK);
49 auto asTuple()
const {
return std::tie(Kind, Name); }
53 : Kind(Kind), Name(Name.str()) {}
80 std::vector<BuildNamespace> Namespaces;
86 : Namespaces(Namespaces) {}
89 Namespaces.push_back(N);
105 Copy.Namespaces.reserve(
Copy.Namespaces.size() +
106 Namespace.Namespaces.size());
107 llvm::append_range(
Copy.Namespaces, Namespace.Namespaces);
Represents a single namespace in the build process.
BuildNamespace(BuildNamespaceKind Kind, llvm::StringRef Name)
bool operator<(const BuildNamespace &Other) const
bool operator!=(const BuildNamespace &Other) const
static BuildNamespace makeCompilationUnit(llvm::StringRef CompilationId)
Creates a BuildNamespace representing a compilation unit.
bool operator==(const BuildNamespace &Other) const
friend class SerializationFormat
Represents a hierarchical sequence of build namespaces.
NestedBuildNamespace(const std::vector< BuildNamespace > &Namespaces)
static NestedBuildNamespace makeCompilationUnit(llvm::StringRef CompilationId)
Creates a NestedBuildNamespace representing a compilation unit.
NestedBuildNamespace()=default
NestedBuildNamespace(const BuildNamespace &N)
bool operator<(const NestedBuildNamespace &Other) const
friend class SerializationFormat
NestedBuildNamespace makeQualified(NestedBuildNamespace Namespace) const
Creates a new NestedBuildNamespace by appending additional namespace.
bool operator!=(const NestedBuildNamespace &Other) const
bool operator==(const NestedBuildNamespace &Other) const
friend class LinkUnitResolution
std::optional< BuildNamespaceKind > parseBuildNamespaceKind(llvm::StringRef Str)
llvm::StringRef toString(BuildNamespaceKind BNK)
@ Other
Other implicit parameter.