Skip to content

Commit 42a8813

Browse files
committed
[RISCV] Rename VariantKind to Specifier
Follow the X86 and Mips renaming. > "Relocation modifier" suggests adjustments happen during the linker's relocation step rather than the assembler's expression evaluation. > "Relocation specifier" is clear, aligns with Arm and IBM AIX's documentation, and fits the assembler's role seamlessly. In addition, rename *MCExpr::getKind, which confusingly shadows the base class getKind.
1 parent 3041fa6 commit 42a8813

File tree

7 files changed

+90
-92
lines changed

7 files changed

+90
-92
lines changed

bolt/lib/Target/RISCV/RISCVMCPlusBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class RISCVMCPlusBuilder : public MCPlusBuilder {
3333
CompFuncTy Comp) const override {
3434
const auto &RISCVExprA = cast<RISCVMCExpr>(A);
3535
const auto &RISCVExprB = cast<RISCVMCExpr>(B);
36-
if (RISCVExprA.getKind() != RISCVExprB.getKind())
36+
if (RISCVExprA.getSpecifier() != RISCVExprB.getSpecifier())
3737
return false;
3838

3939
return MCPlusBuilder::equals(*RISCVExprA.getSubExpr(),
@@ -468,7 +468,7 @@ class RISCVMCPlusBuilder : public MCPlusBuilder {
468468
if (!isa<RISCVMCExpr>(ImmExpr))
469469
return false;
470470

471-
switch (cast<RISCVMCExpr>(ImmExpr)->getKind()) {
471+
switch (cast<RISCVMCExpr>(ImmExpr)->getSpecifier()) {
472472
default:
473473
return false;
474474
case RISCVMCExpr::VK_CALL:

0 commit comments

Comments
 (0)