11#define DEBUG_TYPE "orc"
18 std::unique_ptr<MaterializationResponsibility> R) {
19 auto G = std::make_unique<LinkGraph>(
20 "orc_sectcreate_" + SectName,
21 ObjLinkingLayer.getExecutionSession().getTargetTriple(),
24 auto &Sect =
G->createSection(SectName, MP);
26 ArrayRef<char>(Data->getBuffer().data(), Data->getBuffer().size()));
29 for (
auto &[
Name,
Info] : ExtraSymbols) {
30 auto L =
Info.Flags.isStrong() ? Linkage::Strong : Linkage::Weak;
31 auto S =
Info.Flags.isExported() ? Scope::Default : Scope::Hidden;
32 G->addDefinedSymbol(
B,
Info.Offset, *
Name, 0, L, S,
Info.Flags.isCallable(),
36 ObjLinkingLayer.
emit(std::move(R), std::move(
G));
39void SectCreateMaterializationUnit::discard(
const JITDylib &JD,
44MaterializationUnit::Interface SectCreateMaterializationUnit::getInterface(
45 const ExtraSymbolsMap &ExtraSymbols) {
47 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)
Represents an address in the executor process.
Represents a JIT'd dynamic library.
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.