15 #ifndef LLVM_EXECUTIONENGINE_JITLINK_DEFINEEXTERNALSECTIONSTARTANDENDSYMBOLS_H
16 #define LLVM_EXECUTIONENGINE_JITLINK_DEFINEEXTERNALSECTIONSTARTANDENDSYMBOLS_H
21 #define DEBUG_TYPE "jitlink"
36 template <
typename SymbolIdentifierFunction>
46 std::vector<Symbol *> Externals(
G.external_symbols().begin(),
47 G.external_symbols().end());
49 for (
auto *Sym : Externals) {
52 auto &SR = getSectionRange(*
D.Sec);
63 G.makeDefined(*Sym, *SR.getLastBlock(),
74 auto I = SectionRanges.find(&Sec);
75 if (
I == SectionRanges.end())
76 I = SectionRanges.insert(std::make_pair(&Sec,
SectionRange(Sec))).first;
81 SymbolIdentifierFunction F;
103 template <
typename SymbolIdentifierFunction>
104 DefineExternalSectionStartAndEndSymbols<SymbolIdentifierFunction>
106 SymbolIdentifierFunction &&
F) {
108 std::forward<SymbolIdentifierFunction>(
F));
116 #endif // LLVM_EXECUTIONENGINE_JITLINK_DEFINEEXTERNALSECTIONSTARTANDENDSYMBOLS_H