LLVM
22.0.0git
lib
ExecutionEngine
JITLink
XCOFFLinkGraphBuilder.h
Go to the documentation of this file.
1
//===----- XCOFFLinkGraphBuilder.h - XCOFF LinkGraph builder ----*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// Generic XCOFF LinkGraph building code.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LIB_EXECUTIONENGINE_JITLINK_XCOFFLINKGRAPHBUILDER_H
14
#define LIB_EXECUTIONENGINE_JITLINK_XCOFFLINKGRAPHBUILDER_H
15
16
#include "
llvm/ExecutionEngine/JITLink/JITLink.h
"
17
#include "
llvm/ExecutionEngine/Orc/SymbolStringPool.h
"
18
#include "
llvm/Object/ObjectFile.h
"
19
#include "
llvm/Object/XCOFFObjectFile.h
"
20
#include "
llvm/TargetParser/SubtargetFeature.h
"
21
#include <memory>
22
23
namespace
llvm
{
24
namespace
jitlink {
25
26
class
XCOFFLinkGraphBuilder
{
27
public
:
28
virtual
~XCOFFLinkGraphBuilder
() =
default
;
29
Expected<std::unique_ptr<LinkGraph>
>
buildGraph
();
30
31
public
:
32
XCOFFLinkGraphBuilder
(
const
object::XCOFFObjectFile
&Obj,
33
std::shared_ptr<orc::SymbolStringPool> SSP,
Triple
TT,
34
SubtargetFeatures
Features,
35
LinkGraph::GetEdgeKindNameFunction
GetEdgeKindName);
36
LinkGraph
&
getGraph
()
const
{
return
*G; }
37
const
object::XCOFFObjectFile
&
getObject
()
const
{
return
Obj; }
38
39
private
:
40
Error
processSections();
41
Error
processCsectsAndSymbols();
42
Error
processRelocations();
43
44
private
:
45
const
object::XCOFFObjectFile
&Obj;
46
std::unique_ptr<LinkGraph> G;
47
48
Section
*UndefSection;
49
50
struct
SectionEntry
{
51
jitlink::Section
*
Section
;
52
object::SectionRef
SectionData;
53
};
54
55
DenseMap<uint16_t, SectionEntry>
SectionTable;
56
DenseMap<uint32_t, Block *>
CsectTable;
57
DenseMap<uint32_t, Symbol *>
SymbolIndexTable;
58
};
59
60
}
// namespace jitlink
61
}
// namespace llvm
62
63
#endif
// LIB_EXECUTIONENGINE_JITLINK_XCOFFLINKGRAPHBUILDER_H
JITLink.h
ObjectFile.h
SubtargetFeature.h
SymbolStringPool.h
XCOFFObjectFile.h
llvm::DenseMap
Definition:
DenseMap.h:700
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition:
Error.h:159
llvm::Expected
Tagged union holding either a T or a Error.
Definition:
Error.h:485
llvm::SectionEntry
SectionEntry - represents a section emitted into memory by the dynamic linker.
Definition:
RuntimeDyldImpl.h:46
llvm::SubtargetFeatures
Manages the enabling and disabling of subtarget specific features.
Definition:
SubtargetFeature.h:175
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition:
Triple.h:47
llvm::jitlink::LinkGraph
Definition:
JITLink.h:879
llvm::jitlink::LinkGraph::GetEdgeKindNameFunction
const char *(*)(Edge::Kind) GetEdgeKindNameFunction
Definition:
JITLink.h:1027
llvm::jitlink::Section
Represents an object file section.
Definition:
JITLink.h:718
llvm::jitlink::XCOFFLinkGraphBuilder
Definition:
XCOFFLinkGraphBuilder.h:26
llvm::jitlink::XCOFFLinkGraphBuilder::getObject
const object::XCOFFObjectFile & getObject() const
Definition:
XCOFFLinkGraphBuilder.h:37
llvm::jitlink::XCOFFLinkGraphBuilder::buildGraph
Expected< std::unique_ptr< LinkGraph > > buildGraph()
Definition:
XCOFFLinkGraphBuilder.cpp:404
llvm::jitlink::XCOFFLinkGraphBuilder::~XCOFFLinkGraphBuilder
virtual ~XCOFFLinkGraphBuilder()=default
llvm::jitlink::XCOFFLinkGraphBuilder::getGraph
LinkGraph & getGraph() const
Definition:
XCOFFLinkGraphBuilder.h:36
llvm::object::SectionRef
This is a value type class that represents a single section in the list of sections in the object fil...
Definition:
ObjectFile.h:83
llvm::object::XCOFFObjectFile
Definition:
XCOFFObjectFile.h:538
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
Generated on Wed Sep 3 2025 03:49:58 for LLVM by
1.9.6