Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e3ee6bb

Browse filesBrowse files
lhamesLang Hames
authored andcommitted
[JITLink][i386] Make ELFLinkGraphBuilder_i386 a regular (non-template) class.
The ELF type for i386 is always ELF32LE so we can pass ELF32LE directly to the base class template (ELFLinkGraphBuilder).
1 parent 75e5643 commit e3ee6bb
Copy full SHA for e3ee6bb

File tree

Expand file treeCollapse file tree

1 file changed

+6
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-5
lines changed

‎llvm/lib/ExecutionEngine/JITLink/ELF_i386.cpp

Copy file name to clipboardExpand all lines: llvm/lib/ExecutionEngine/JITLink/ELF_i386.cpp
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,10 @@ class ELFJITLinker_i386 : public JITLinker<ELFJITLinker_i386> {
110110
}
111111
};
112112

113-
template <typename ELFT>
114-
class ELFLinkGraphBuilder_i386 : public ELFLinkGraphBuilder<ELFT> {
113+
class ELFLinkGraphBuilder_i386 : public ELFLinkGraphBuilder<object::ELF32LE> {
115114
private:
115+
using ELFT = object::ELF32LE;
116+
116117
static Expected<i386::EdgeKind_i386> getRelocationKind(const uint32_t Type) {
117118
using namespace i386;
118119
switch (Type) {
@@ -253,9 +254,9 @@ createLinkGraphFromELFObject_i386(MemoryBufferRef ObjectBuffer,
253254

254255
auto &ELFObjFile = cast<object::ELFObjectFile<object::ELF32LE>>(**ELFObj);
255256

256-
return ELFLinkGraphBuilder_i386<object::ELF32LE>(
257-
(*ELFObj)->getFileName(), ELFObjFile.getELFFile(), std::move(SSP),
258-
(*ELFObj)->makeTriple(), std::move(*Features))
257+
return ELFLinkGraphBuilder_i386((*ELFObj)->getFileName(),
258+
ELFObjFile.getELFFile(), std::move(SSP),
259+
(*ELFObj)->makeTriple(), std::move(*Features))
259260
.buildGraph();
260261
}
261262

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.