SymName[Letter] = toupper(SymName[Letter]);
SmallString<128> TmpStr;
- AP.Mang->getNameWithPrefix(TmpStr, SymName);
+ Mangler::getNameWithPrefix(TmpStr, SymName, M.getDataLayout());
- MCSymbol *Sym = AP.OutContext.GetOrCreateSymbol(TmpStr);
+ MCSymbol *Sym = AP.OutContext.getOrCreateSymbol(TmpStr);
- AP.OutStreamer.EmitSymbolAttribute(Sym, MCSA_Global);
- AP.OutStreamer.EmitLabel(Sym);
+ AP.OutStreamer->EmitSymbolAttribute(Sym, MCSA_Global);
+ AP.OutStreamer->EmitLabel(Sym);
}
void OcamlGCMetadataPrinter::beginAssembly(Module &M, GCModuleInfo &Info,
AsmPrinter &AP) {
- AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getTextSection());
+ AP.OutStreamer->SwitchSection(AP.getObjFileLowering().getTextSection());
EmitCamlGlobal(M, AP, "code_begin");
- AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getDataSection());
+ AP.OutStreamer->SwitchSection(AP.getObjFileLowering().getDataSection());
EmitCamlGlobal(M, AP, "data_begin");
}
///
void OcamlGCMetadataPrinter::finishAssembly(Module &M, GCModuleInfo &Info,
AsmPrinter &AP) {
- unsigned IntPtrSize =
- AP.TM.getSubtargetImpl()->getDataLayout()->getPointerSize();
+ unsigned IntPtrSize = M.getDataLayout().getPointerSize();
- AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getTextSection());
+ AP.OutStreamer->SwitchSection(AP.getObjFileLowering().getTextSection());
EmitCamlGlobal(M, AP, "code_end");
- AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getDataSection());
+ AP.OutStreamer->SwitchSection(AP.getObjFileLowering().getDataSection());
EmitCamlGlobal(M, AP, "data_end");
// FIXME: Why does ocaml emit this??
- AP.OutStreamer.EmitIntValue(0, IntPtrSize);
+ AP.OutStreamer->EmitIntValue(0, IntPtrSize);
- AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getDataSection());
+ AP.OutStreamer->SwitchSection(AP.getObjFileLowering().getDataSection());
EmitCamlGlobal(M, AP, "frametable");
int NumDescriptors = 0;
Twine(uintptr_t(&FI)) + ")");
}
- AP.OutStreamer.AddComment("live roots for " +
- Twine(FI.getFunction().getName()));
- AP.OutStreamer.AddBlankLine();
+ AP.OutStreamer->AddComment("live roots for " +
+ Twine(FI.getFunction().getName()));
+ AP.OutStreamer->AddBlankLine();
for (GCFunctionInfo::iterator J = FI.begin(), JE = FI.end(); J != JE; ++J) {
size_t LiveCount = FI.live_size(J);
Twine(LiveCount) + " >= 65536.");
}
- AP.OutStreamer.EmitSymbolValue(J->Label, IntPtrSize);
+ AP.OutStreamer->EmitSymbolValue(J->Label, IntPtrSize);
AP.EmitInt16(FrameSize);
AP.EmitInt16(LiveCount);