16#ifndef LLVM_CLANG_SCALABLESTATICANALYSIS_CORE_ENTITYLINKER_ENTITYLINKER_H
17#define LLVM_CLANG_SCALABLESTATICANALYSIS_CORE_ENTITYLINKER_ENTITYLINKER_H
21#include "llvm/Support/Error.h"
22#include "llvm/TargetParser/Triple.h"
48 std::set<BuildNamespace> ProcessedTUNamespaces;
57 : Output(
std::move(TargetTriple),
std::move(LUNamespace)) {}
70 llvm::Error
link(std::unique_ptr<TUSummaryEncoding> Summary);
80 llvm::Error
link(std::unique_ptr<StaticLibrary>
Library);
91 llvm::Error
link(std::unique_ptr<MultiArchStaticLibrary>
Library);
112 llvm::Error checkTargetTriple(
const llvm::Triple &TargetTriple,
135 std::vector<EntitySummaryEncoding *>
137 const std::map<EntityId, EntityId> &EntityResolutionTable);
144 llvm::Error patch(
const std::vector<EntitySummaryEncoding *> &PatchTargets,
145 const std::map<EntityId, EntityId> &EntityResolutionTable);
Represents a single namespace in the build process.
Lightweight opaque handle representing an entity in an EntityIdTable.
Represents the linkage properties of an entity in the program model.
EntityLinker(llvm::Triple TargetTriple, NestedBuildNamespace LUNamespace)
Constructs an EntityLinker to link TU summaries into a LU summary.
llvm::Error link(std::unique_ptr< TUSummaryEncoding > Summary)
Links a TU summary into a LU summary.
LUSummaryEncoding takeOutput() &&
Returns the accumulated LU summary.
size_t getLinkedTUCount() const
Returns the number of TU summaries folded in so far.
Uniquely identifies an entity in a program.
Represents a link unit summary in its serialized encoding.
Represents a multi-architecture static library.
Represents a hierarchical sequence of build namespaces.
Represents a static library of translation unit summary encodings.
Represents a translation unit summary in its serialized encoding.
NestedBuildNamespace resolveNamespace(const NestedBuildNamespace &LUNamespace, const NestedBuildNamespace &TUNamespace, const NestedBuildNamespace &EntityNamespace, EntityLinkageType Linkage)
Computes the build namespace an entity should carry after linking, given its linkage.
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.