#include "llvm/ExecutionEngine/JITLink/JITLink.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/ExecutionEngine/JITLink/COFF.h"
#include "llvm/ExecutionEngine/JITLink/ELF.h"
#include "llvm/ExecutionEngine/JITLink/MachO.h"
#include "llvm/ExecutionEngine/JITLink/aarch64.h"
#include "llvm/ExecutionEngine/JITLink/i386.h"
#include "llvm/ExecutionEngine/JITLink/loongarch.h"
#include "llvm/ExecutionEngine/JITLink/x86_64.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
usingnamespacellvm;
usingnamespacellvm::object;
#define DEBUG_TYPE …
namespace {
enum JITLinkErrorCode { … };
class JITLinkerErrorCategory : public std::error_category { … };
}
namespace llvm {
namespace jitlink {
char JITLinkError::ID = …;
void JITLinkError::log(raw_ostream &OS) const { … }
std::error_code JITLinkError::convertToErrorCode() const { … }
const char *getGenericEdgeKindName(Edge::Kind K) { … }
const char *getLinkageName(Linkage L) { … }
const char *getScopeName(Scope S) { … }
bool isCStringBlock(Block &B) { … }
raw_ostream &operator<<(raw_ostream &OS, const Block &B) { … }
raw_ostream &operator<<(raw_ostream &OS, const Symbol &Sym) { … }
void printEdge(raw_ostream &OS, const Block &B, const Edge &E,
StringRef EdgeKindName) { … }
Section::~Section() { … }
std::vector<Block *> LinkGraph::splitBlockImpl(std::vector<Block *> Blocks,
SplitBlockCache *Cache) { … }
void LinkGraph::dump(raw_ostream &OS) { … }
raw_ostream &operator<<(raw_ostream &OS, const SymbolLookupFlags &LF) { … }
void JITLinkAsyncLookupContinuation::anchor() { … }
JITLinkContext::~JITLinkContext() = default;
bool JITLinkContext::shouldAddDefaultTargetPasses(const Triple &TT) const { … }
LinkGraphPassFunction JITLinkContext::getMarkLivePass(const Triple &TT) const { … }
Error JITLinkContext::modifyPassConfig(LinkGraph &G,
PassConfiguration &Config) { … }
Error markAllSymbolsLive(LinkGraph &G) { … }
Error makeTargetOutOfRangeError(const LinkGraph &G, const Block &B,
const Edge &E) { … }
Error makeAlignmentError(llvm::orc::ExecutorAddr Loc, uint64_t Value, int N,
const Edge &E) { … }
AnonymousPointerCreator getAnonymousPointerCreator(const Triple &TT) { … }
PointerJumpStubCreator getPointerJumpStubCreator(const Triple &TT) { … }
Expected<std::unique_ptr<LinkGraph>>
createLinkGraphFromObject(MemoryBufferRef ObjectBuffer) { … }
std::unique_ptr<LinkGraph> absoluteSymbolsLinkGraph(const Triple &TT,
orc::SymbolMap Symbols) { … }
void link(std::unique_ptr<LinkGraph> G, std::unique_ptr<JITLinkContext> Ctx) { … }
}
}