typedef std::map<const Value *, unsigned> ValueMapTy;
ValueMapTy NumberForBB;
public:
- SparcAsmPrinter(raw_ostream &O, TargetMachine &TM,
- const TargetAsmInfo *T, bool F)
- : AsmPrinter(O, TM, T, F) {}
+ explicit SparcAsmPrinter(raw_ostream &O, TargetMachine &TM,
+ const TargetAsmInfo *T, CodeGenOpt::Level OL,
+ bool V)
+ : AsmPrinter(O, TM, T, OL, V) {}
virtual const char *getPassName() const {
return "Sparc Assembly Printer";
///
FunctionPass *llvm::createSparcCodePrinterPass(raw_ostream &o,
TargetMachine &tm,
- bool fast) {
- return new SparcAsmPrinter(o, tm, tm.getTargetAsmInfo(), fast);
+ CodeGenOpt::Level OptLevel,
+ bool verbose) {
+ return new SparcAsmPrinter(o, tm, tm.getTargetAsmInfo(), OptLevel, verbose);
}
/// runOnMachineFunction - This uses the printInstruction()
O << "\n\n";
std::string name = Mang->getValueName(GVar);
Constant *C = GVar->getInitializer();
- unsigned Size = TD->getTypePaddedSize(C->getType());
+ unsigned Size = TD->getTypeAllocSize(C->getType());
unsigned Align = TD->getPreferredAlignment(GVar);
printVisibility(name, GVar->getVisibility());
return false;
}
+
+// Force static initialization when called from
+// llvm/InitializeAllAsmPrinters.h
+namespace llvm {
+ void InitializeSparcAsmPrinter() { }
+}