PIC16AsmPrinter::PIC16AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM, MCStreamer &Streamer) : AsmPrinter(O, TM, Streamer), DbgInfo(O, TM.getMCAsmInfo()) { PTLI = static_cast<PIC16TargetLowering*>(TM.getTargetLowering()); PMAI = static_cast<const PIC16MCAsmInfo*>(TM.getMCAsmInfo()); PTOF = (PIC16TargetObjectFile *)&PTLI->getObjFileLowering(); }
void TargetLoweringObjectFileMachO::getNameWithPrefix( SmallVectorImpl<char> &OutName, const GlobalValue *GV, Mangler &Mang, const TargetMachine &TM) const { SectionKind GVKind = TargetLoweringObjectFile::getKindForGlobal(GV, TM); const MCSection *TheSection = SectionForGlobal(GV, GVKind, Mang, TM); bool CannotUsePrivateLabel = !canUsePrivateLabel(*TM.getMCAsmInfo(), *TheSection); Mang.getNameWithPrefix(OutName, GV, CannotUsePrivateLabel); }
void TargetLoweringObjectFileMachO::getNameWithPrefix( SmallVectorImpl<char> &OutName, const GlobalValue *GV, const TargetMachine &TM) const { bool CannotUsePrivateLabel = true; if (auto *GO = GV->getBaseObject()) { SectionKind GOKind = TargetLoweringObjectFile::getKindForGlobal(GO, TM); const MCSection *TheSection = SectionForGlobal(GO, GOKind, TM); CannotUsePrivateLabel = !canUsePrivateLabel(*TM.getMCAsmInfo(), *TheSection); } getMangler().getNameWithPrefix(OutName, GV, CannotUsePrivateLabel); }