10#include "llvm/Support/ErrorHandling.h"
18 return "compilation_unit";
22 llvm_unreachable(
"Unknown BuildNamespaceKind");
26 if (Str ==
"compilation_unit")
28 if (Str ==
"link_unit")
40 return asTuple() ==
Other.asTuple();
44 return !(*
this ==
Other);
48 return asTuple() <
Other.asTuple();
54 Result.Namespaces.push_back(
62 return Namespaces ==
Other.Namespaces;
66 return !(*
this ==
Other);
70 return Namespaces <
Other.Namespaces;
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
Represents a hierarchical sequence of build namespaces.
static NestedBuildNamespace makeCompilationUnit(llvm::StringRef CompilationId)
Creates a NestedBuildNamespace representing a compilation unit.
NestedBuildNamespace()=default
bool operator<(const NestedBuildNamespace &Other) const
bool operator!=(const NestedBuildNamespace &Other) const
bool operator==(const NestedBuildNamespace &Other) const
std::optional< BuildNamespaceKind > parseBuildNamespaceKind(llvm::StringRef Str)
llvm::StringRef toString(BuildNamespaceKind BNK)
@ Result
The result type of a method or function.
@ Other
Other implicit parameter.