clang 22.0.0git
EntityName.cpp
Go to the documentation of this file.
1//===- EntityName.cpp -------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10
11namespace clang::ssaf {
12
13EntityName::EntityName(llvm::StringRef USR, llvm::StringRef Suffix,
14 NestedBuildNamespace Namespace)
15 : USR(USR.str()), Suffix(Suffix), Namespace(std::move(Namespace)) {}
16
18 return asTuple() == Other.asTuple();
19}
20
22 return !(*this == Other);
23}
24
26 return asTuple() < Other.asTuple();
27}
28
30 auto Copy = *this;
31 Copy.Namespace = Copy.Namespace.makeQualified(Namespace);
32
33 return Copy;
34}
35
36} // namespace clang::ssaf
bool operator==(const EntityName &Other) const
EntityName(llvm::StringRef USR, llvm::StringRef Suffix, NestedBuildNamespace Namespace)
Client code should not use this constructor directly.
EntityName makeQualified(NestedBuildNamespace Namespace) const
Creates a new EntityName with additional build namespace qualification.
bool operator!=(const EntityName &Other) const
bool operator<(const EntityName &Other) const
Represents a hierarchical sequence of build namespaces.
@ Other
Other implicit parameter.
Definition Decl.h:1746