[PowerPC] Clean up VK_PPC_TOC... names

This is another minor cleanup; to bring enum names in line
with the corresponding @modifier names, this renames:

  VK_PPC_TOC -> VK_PPC_TOCBASE
  VK_PPC_TOC_ENTRY -> VK_PPC_TOC16

No code change intended.

llvm-svn: 184491
This commit is contained in:
Ulrich Weigand 2013-06-20 22:39:42 +00:00
parent 35fd79237f
commit 68e2e1b32b
4 changed files with 23 additions and 23 deletions

View File

@ -171,16 +171,16 @@ public:
VK_ARM_TARGET2,
VK_ARM_PREL31,
VK_PPC_TOC, // TOC base
VK_PPC_TOC_ENTRY, // TOC entry
VK_PPC_ADDR16_HA, // symbol@ha
VK_PPC_ADDR16_LO, // symbol@l
VK_PPC_TPREL16_HA, // symbol@tprel@ha
VK_PPC_TPREL16_LO, // symbol@tprel@l
VK_PPC_DTPREL16_HA, // symbol@dtprel@ha
VK_PPC_DTPREL16_LO, // symbol@dtprel@l
VK_PPC_TOC16_HA, // symbol@toc@ha
VK_PPC_TOC16_LO, // symbol@toc@l
VK_PPC_ADDR16_HA, // symbol@ha
VK_PPC_ADDR16_LO, // symbol@l
VK_PPC_TOCBASE, // symbol@tocbase
VK_PPC_TOC16, // symbol@toc
VK_PPC_TOC16_HA, // symbol@toc@ha
VK_PPC_TOC16_LO, // symbol@toc@l
VK_PPC_TPREL16_HA, // symbol@tprel@ha
VK_PPC_TPREL16_LO, // symbol@tprel@l
VK_PPC_DTPREL16_HA, // symbol@dtprel@ha
VK_PPC_DTPREL16_LO, // symbol@dtprel@l
VK_PPC_GOT_TPREL16_HA, // symbol@got@tprel@ha
VK_PPC_GOT_TPREL16_LO, // symbol@got@tprel@l
VK_PPC_TLS, // symbol@tls

View File

@ -196,16 +196,16 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) {
case VK_ARM_TARGET1: return "(target1)";
case VK_ARM_TARGET2: return "(target2)";
case VK_ARM_PREL31: return "(prel31)";
case VK_PPC_TOC: return "tocbase";
case VK_PPC_TOC_ENTRY: return "toc";
case VK_PPC_ADDR16_HA: return "ha";
case VK_PPC_ADDR16_LO: return "l";
case VK_PPC_TOCBASE: return "tocbase";
case VK_PPC_TOC16: return "toc";
case VK_PPC_TOC16_HA: return "toc@ha";
case VK_PPC_TOC16_LO: return "toc@l";
case VK_PPC_TPREL16_HA: return "tprel@ha";
case VK_PPC_TPREL16_LO: return "tprel@l";
case VK_PPC_DTPREL16_HA: return "dtprel@ha";
case VK_PPC_DTPREL16_LO: return "dtprel@l";
case VK_PPC_TOC16_HA: return "toc@ha";
case VK_PPC_TOC16_LO: return "toc@l";
case VK_PPC_GOT_TPREL16_HA: return "got@tprel@ha";
case VK_PPC_GOT_TPREL16_LO: return "got@tprel@l";
case VK_PPC_TLS: return "tls";
@ -283,10 +283,10 @@ MCSymbolRefExpr::getVariantKindForName(StringRef Name) {
.Case("ha", VK_PPC_ADDR16_HA)
.Case("L", VK_PPC_ADDR16_LO)
.Case("l", VK_PPC_ADDR16_LO)
.Case("TOCBASE", VK_PPC_TOC)
.Case("tocbase", VK_PPC_TOC)
.Case("TOC", VK_PPC_TOC_ENTRY)
.Case("toc", VK_PPC_TOC_ENTRY)
.Case("TOCBASE", VK_PPC_TOCBASE)
.Case("tocbase", VK_PPC_TOCBASE)
.Case("TOC", VK_PPC_TOC16)
.Case("toc", VK_PPC_TOC16)
.Case("TOC@HA", VK_PPC_TOC16_HA)
.Case("toc@ha", VK_PPC_TOC16_HA)
.Case("TOC@L", VK_PPC_TOC16_LO)

View File

@ -93,7 +93,7 @@ unsigned PPCELFObjectWriter::getRelocTypeInner(const MCValue &Target,
case MCSymbolRefExpr::VK_PPC_ADDR16_HA:
Type = ELF::R_PPC_ADDR16_HA;
break;
case MCSymbolRefExpr::VK_PPC_TOC_ENTRY:
case MCSymbolRefExpr::VK_PPC_TOC16:
Type = ELF::R_PPC64_TOC16;
break;
case MCSymbolRefExpr::VK_PPC_TOC16_LO:
@ -140,7 +140,7 @@ unsigned PPCELFObjectWriter::getRelocTypeInner(const MCValue &Target,
case MCSymbolRefExpr::VK_PPC_ADDR16_LO:
Type = ELF::R_PPC64_ADDR16_LO_DS;
break;
case MCSymbolRefExpr::VK_PPC_TOC_ENTRY:
case MCSymbolRefExpr::VK_PPC_TOC16:
Type = ELF::R_PPC64_TOC16_DS;
break;
case MCSymbolRefExpr::VK_PPC_TOC16_LO:
@ -168,7 +168,7 @@ unsigned PPCELFObjectWriter::getRelocTypeInner(const MCValue &Target,
case FK_Data_8:
switch (Modifier) {
default: llvm_unreachable("Unsupported Modifier");
case MCSymbolRefExpr::VK_PPC_TOC:
case MCSymbolRefExpr::VK_PPC_TOCBASE:
Type = ELF::R_PPC64_TOC;
break;
case MCSymbolRefExpr::VK_None:

View File

@ -372,7 +372,7 @@ void PPCAsmPrinter::EmitInstruction(const MachineInstr *MI) {
MCSymbol *TOCEntry = lookUpOrCreateTOCEntry(MOSymbol);
const MCExpr *Exp =
MCSymbolRefExpr::Create(TOCEntry, MCSymbolRefExpr::VK_PPC_TOC_ENTRY,
MCSymbolRefExpr::Create(TOCEntry, MCSymbolRefExpr::VK_PPC_TOC16,
OutContext);
TmpInst.getOperand(1) = MCOperand::CreateExpr(Exp);
OutStreamer.EmitInstruction(TmpInst);
@ -706,7 +706,7 @@ void PPCLinuxAsmPrinter::EmitFunctionEntryLabel() {
MCSymbol *Symbol2 = OutContext.GetOrCreateSymbol(StringRef(".TOC."));
// Generates a R_PPC64_TOC relocation for TOC base insertion.
OutStreamer.EmitValue(MCSymbolRefExpr::Create(Symbol2,
MCSymbolRefExpr::VK_PPC_TOC, OutContext),
MCSymbolRefExpr::VK_PPC_TOCBASE, OutContext),
8/*size*/);
// Emit a null environment pointer.
OutStreamer.EmitIntValue(0, 8 /* size */);