11#define DEBUG_TYPE "orc"
18 std::unique_ptr<MaterializationResponsibility> R) {
19 auto G = std::make_unique<LinkGraph>(
20 "orc_sectcreate_" + SectName,
25 auto &Sect =
G->createSection(SectName, MP);
27 ArrayRef<char>(Data->getBuffer().data(), Data->getBuffer().size()));
30 for (
auto &[
Name,
Info] : ExtraSymbols) {
31 auto L =
Info.Flags.isStrong() ? Linkage::Strong : Linkage::Weak;
32 auto S =
Info.Flags.isExported() ? Scope::Default : Scope::Hidden;
33 G->addDefinedSymbol(
B,
Info.Offset, *
Name, 0, L, S,
Info.Flags.isCallable(),
37 ObjLinkingLayer.
emit(std::move(R), std::move(
G));
40void SectCreateMaterializationUnit::discard(
const JITDylib &JD,
45MaterializationUnit::Interface SectCreateMaterializationUnit::getInterface(
46 const ExtraSymbolsMap &ExtraSymbols) {
48 for (
auto &[
Name, Info] : ExtraSymbols)
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
Analysis containing CSE Info
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
bool erase(const KeyT &Val)
const Triple & getTargetTriple() const
Return the triple for the executor.
std::shared_ptr< SymbolStringPool > getSymbolStringPool()
Get the SymbolStringPool for this instance.
Represents an address in the executor process.
Represents a JIT'd dynamic library.
ExecutionSession & getExecutionSession()
SymbolFlagsMap SymbolFlags
void emit(std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O) override
Emit an object file.
void materialize(std::unique_ptr< MaterializationResponsibility > R) override
Implementations of this method should materialize all symbols in the materialzation unit,...
Pointer to a pooled string representing a symbol name.
const char * getGenericEdgeKindName(Edge::Kind K)
Returns the string name of the given generic edge kind, or "unknown" otherwise.
DenseMap< SymbolStringPtr, JITSymbolFlags > SymbolFlagsMap
A map from symbol names (as SymbolStringPtrs) to JITSymbolFlags.