Typo.
[oota-llvm.git] / lib / CodeGen / ELFWriter.cpp
index 5fd3dcc1d6cb354e22dceafaf3810e075e2aeecd..8ecddb877f4b614f2618a47703312c35827e5351 100644 (file)
@@ -47,6 +47,7 @@
 #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,
@@ -176,7 +177,8 @@ bool ELFCodeEmitter::finishFunction(MachineFunction &F) {
 //                          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;
@@ -255,7 +257,7 @@ void ELFWriter::EmitGlobal(GlobalVariable *GV) {
   }
 
   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