#include <list>
using namespace llvm;
+char ELFWriter::ID = 0;
/// AddELFWriter - Concrete function to add the ELF writer to the function pass
/// manager.
MachineCodeEmitter *llvm::AddELFWriter(FunctionPassManager &FPM,
// ELFWriter Implementation
//===----------------------------------------------------------------------===//
-ELFWriter::ELFWriter(std::ostream &o, TargetMachine &tm) : O(o), TM(tm) {
+ELFWriter::ELFWriter(std::ostream &o, TargetMachine &tm)
+ : MachineFunctionPass((intptr_t)&ID), O(o), TM(tm) {
e_flags = 0; // e_flags defaults to 0, no flags.
is64Bit = TM.getTargetData()->getPointerSizeInBits() == 64;
}
const Type *GVType = (const Type*)GV->getType();
- unsigned Align = TM.getTargetData()->getTypeAlignmentPref(GVType);
+ unsigned Align = TM.getTargetData()->getPrefTypeAlignment(GVType);
unsigned Size = TM.getTargetData()->getTypeSize(GVType);
// If this global has a zero initializer, it is part of the .bss or common