mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
eliminate the now-unneeded context argument of MBB::getSymbol()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98451 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -698,7 +698,7 @@ void AsmPrinter::EmitJumpTableInfo() {
|
||||
|
||||
// .set LJTSet, LBB32-base
|
||||
const MCExpr *LHS =
|
||||
MCSymbolRefExpr::Create(MBB->getSymbol(OutContext), OutContext);
|
||||
MCSymbolRefExpr::Create(MBB->getSymbol(), OutContext);
|
||||
OutStreamer.EmitAssignment(GetJTSetSymbol(JTI, MBB->getNumber()),
|
||||
MCBinaryExpr::CreateSub(LHS, Base, OutContext));
|
||||
}
|
||||
@@ -736,13 +736,13 @@ void AsmPrinter::EmitJumpTableEntry(const MachineJumpTableInfo *MJTI,
|
||||
case MachineJumpTableInfo::EK_BlockAddress:
|
||||
// EK_BlockAddress - Each entry is a plain address of block, e.g.:
|
||||
// .word LBB123
|
||||
Value = MCSymbolRefExpr::Create(MBB->getSymbol(OutContext), OutContext);
|
||||
Value = MCSymbolRefExpr::Create(MBB->getSymbol(), OutContext);
|
||||
break;
|
||||
case MachineJumpTableInfo::EK_GPRel32BlockAddress: {
|
||||
// EK_GPRel32BlockAddress - Each entry is an address of block, encoded
|
||||
// with a relocation as gp-relative, e.g.:
|
||||
// .gprel32 LBB123
|
||||
MCSymbol *MBBSym = MBB->getSymbol(OutContext);
|
||||
MCSymbol *MBBSym = MBB->getSymbol();
|
||||
OutStreamer.EmitGPRel32Value(MCSymbolRefExpr::Create(MBBSym, OutContext));
|
||||
return;
|
||||
}
|
||||
@@ -766,7 +766,7 @@ void AsmPrinter::EmitJumpTableEntry(const MachineJumpTableInfo *MJTI,
|
||||
break;
|
||||
}
|
||||
// Otherwise, use the difference as the jump table entry.
|
||||
Value = MCSymbolRefExpr::Create(MBB->getSymbol(OutContext), OutContext);
|
||||
Value = MCSymbolRefExpr::Create(MBB->getSymbol(), OutContext);
|
||||
const MCExpr *JTI = MCSymbolRefExpr::Create(GetJTISymbol(UID), OutContext);
|
||||
Value = MCBinaryExpr::CreateSub(Value, JTI, OutContext);
|
||||
break;
|
||||
@@ -1500,7 +1500,7 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
|
||||
++OpNo; // Skip over the ID number.
|
||||
|
||||
if (Modifier[0] == 'l') // labels are target independent
|
||||
O << *MI->getOperand(OpNo).getMBB()->getSymbol(OutContext);
|
||||
O << *MI->getOperand(OpNo).getMBB()->getSymbol();
|
||||
else {
|
||||
AsmPrinter *AP = const_cast<AsmPrinter*>(this);
|
||||
if ((OpFlags & 7) == 4) {
|
||||
@@ -1756,7 +1756,7 @@ void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock *MBB) const {
|
||||
PrintBasicBlockLoopComments(*MBB, LI, *this);
|
||||
}
|
||||
|
||||
OutStreamer.EmitLabel(MBB->getSymbol(OutContext));
|
||||
OutStreamer.EmitLabel(MBB->getSymbol());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -41,9 +41,10 @@ MachineBasicBlock::~MachineBasicBlock() {
|
||||
|
||||
/// getSymbol - Return the MCSymbol for this basic block.
|
||||
///
|
||||
MCSymbol *MachineBasicBlock::getSymbol(MCContext &Ctx) const {
|
||||
MCSymbol *MachineBasicBlock::getSymbol() const {
|
||||
const MachineFunction *MF = getParent();
|
||||
const char *Prefix = MF->getTarget().getMCAsmInfo()->getPrivateGlobalPrefix();
|
||||
MCContext &Ctx = MF->getContext();
|
||||
const char *Prefix = Ctx.getAsmInfo().getPrivateGlobalPrefix();
|
||||
return Ctx.GetOrCreateTemporarySymbol(Twine(Prefix) + "BB" +
|
||||
Twine(MF->getFunctionNumber()) + "_" +
|
||||
Twine(getNumber()));
|
||||
|
Reference in New Issue
Block a user