Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
Show First 20 Lines • Show All 291 Lines • ▼ Show 20 Lines | case '$': { | ||||
// FIXME: Shouldn't arch-independent output template handling go into | // FIXME: Shouldn't arch-independent output template handling go into | ||||
// PrintAsmOperand? | // PrintAsmOperand? | ||||
// Labels are target independent. | // Labels are target independent. | ||||
if (MI->getOperand(OpNo).isBlockAddress()) { | if (MI->getOperand(OpNo).isBlockAddress()) { | ||||
const BlockAddress *BA = MI->getOperand(OpNo).getBlockAddress(); | const BlockAddress *BA = MI->getOperand(OpNo).getBlockAddress(); | ||||
MCSymbol *Sym = AP->GetBlockAddressSymbol(BA); | MCSymbol *Sym = AP->GetBlockAddressSymbol(BA); | ||||
Sym->print(OS, AP->MAI); | Sym->print(OS, AP->MAI); | ||||
MMI->getContext().registerInlineAsmLabel(Sym); | |||||
} else if (MI->getOperand(OpNo).isMBB()) { | } else if (MI->getOperand(OpNo).isMBB()) { | ||||
const MCSymbol *Sym = MI->getOperand(OpNo).getMBB()->getSymbol(); | const MCSymbol *Sym = MI->getOperand(OpNo).getMBB()->getSymbol(); | ||||
Sym->print(OS, AP->MAI); | Sym->print(OS, AP->MAI); | ||||
} else if (InlineAsm::isMemKind(OpFlags)) { | } else if (InlineAsm::isMemKind(OpFlags)) { | ||||
Error = AP->PrintAsmMemoryOperand( | Error = AP->PrintAsmMemoryOperand( | ||||
MI, OpNo, Modifier[0] ? Modifier : nullptr, OS); | MI, OpNo, Modifier[0] ? Modifier : nullptr, OS); | ||||
} else { | } else { | ||||
Error = AP->PrintAsmOperand(MI, OpNo, | Error = AP->PrintAsmOperand(MI, OpNo, | ||||
▲ Show 20 Lines • Show All 210 Lines • Show Last 20 Lines |