Skip to content

Commit 9730b7b

Browse files
[JITLink][AArch32] Rename stubs flavor Thumbv7 to v7 (NFC)
1 parent 5083c86 commit 9730b7b

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

llvm/include/llvm/ExecutionEngine/JITLink/aarch32.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ const char *getEdgeKindName(Edge::Kind K);
123123
///
124124
/// Stubs are often called "veneers" in the official docs and online.
125125
///
126-
enum StubsFlavor {
126+
enum class StubsFlavor {
127127
Unsupported = 0,
128-
Thumbv7,
128+
v7,
129129
};
130130

131131
/// JITLink sub-arch configuration for Arm CPU models
132132
struct ArmConfig {
133133
bool J1J2BranchEncoding = false;
134-
StubsFlavor Stubs = Unsupported;
134+
StubsFlavor Stubs = StubsFlavor::Unsupported;
135135
};
136136

137137
/// Obtain the sub-arch configuration for a given Arm CPU model.
@@ -141,7 +141,7 @@ inline ArmConfig getArmConfigForCPUArch(ARMBuildAttrs::CPUArch CPUArch) {
141141
case ARMBuildAttrs::v7:
142142
case ARMBuildAttrs::v8_A:
143143
ArmCfg.J1J2BranchEncoding = true;
144-
ArmCfg.Stubs = Thumbv7;
144+
ArmCfg.Stubs = StubsFlavor::v7;
145145
break;
146146
default:
147147
DEBUG_WITH_TYPE("jitlink", {
@@ -380,9 +380,9 @@ class StubsManager : public TableManager<StubsManager<Flavor>> {
380380

381381
/// Create a branch range extension stub with Thumb encoding for v7 CPUs.
382382
template <>
383-
Symbol &StubsManager<Thumbv7>::createEntry(LinkGraph &G, Symbol &Target);
383+
Symbol &StubsManager<StubsFlavor::v7>::createEntry(LinkGraph &G, Symbol &Target);
384384

385-
template <> inline StringRef StubsManager<Thumbv7>::getSectionName() {
385+
template <> inline StringRef StubsManager<StubsFlavor::v7>::getSectionName() {
386386
return "__llvm_jitlink_aarch32_STUBS_Thumbv7";
387387
}
388388

llvm/lib/ExecutionEngine/JITLink/ELF_aarch32.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ createLinkGraphFromELFObject_aarch32(MemoryBufferRef ObjectBuffer) {
257257
case v7:
258258
case v8_A:
259259
ArmCfg = aarch32::getArmConfigForCPUArch(Arch);
260-
assert(ArmCfg.Stubs != aarch32::Unsupported &&
260+
assert(ArmCfg.Stubs != aarch32::StubsFlavor::Unsupported &&
261261
"Provide a config for each supported CPU");
262262
break;
263263
default:
@@ -309,11 +309,11 @@ void link_ELF_aarch32(std::unique_ptr<LinkGraph> G,
309309
PassCfg.PrePrunePasses.push_back(markAllSymbolsLive);
310310

311311
switch (ArmCfg.Stubs) {
312-
case aarch32::Thumbv7:
312+
case aarch32::StubsFlavor::v7:
313313
PassCfg.PostPrunePasses.push_back(
314-
buildTables_ELF_aarch32<aarch32::Thumbv7>);
314+
buildTables_ELF_aarch32<aarch32::StubsFlavor::v7>);
315315
break;
316-
case aarch32::Unsupported:
316+
case aarch32::StubsFlavor::Unsupported:
317317
llvm_unreachable("Check before building graph");
318318
}
319319
}

llvm/lib/ExecutionEngine/JITLink/aarch32.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ const uint8_t Thumbv7ABS[] = {
685685
};
686686

687687
template <>
688-
Symbol &StubsManager<Thumbv7>::createEntry(LinkGraph &G, Symbol &Target) {
688+
Symbol &StubsManager<StubsFlavor::v7>::createEntry(LinkGraph &G, Symbol &Target) {
689689
constexpr uint64_t Alignment = 4;
690690
Block &B = addStub(G, Thumbv7ABS, Alignment);
691691
LLVM_DEBUG({

0 commit comments

Comments
 (0)