X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FMachOWriter.cpp;h=92b3eb4311c348c4b72115baaf5aa827446236a6;hb=420cdebbcb95f3881ab3518fd3bb670837669e43;hp=56bf70a62ae44ab99e3184f1219e07fef1f470d8;hpb=4ee451de366474b9c228b4e5fa573795a715216d;p=oota-llvm.git diff --git a/lib/CodeGen/MachOWriter.cpp b/lib/CodeGen/MachOWriter.cpp index 56bf70a62ae..92b3eb4311c 100644 --- a/lib/CodeGen/MachOWriter.cpp +++ b/lib/CodeGen/MachOWriter.cpp @@ -125,6 +125,20 @@ namespace llvm { return MBBLocations[MBB->getNumber()]; } + virtual intptr_t getLabelAddress(uint64_t Label) const { + assert(0 && "get Label not implemented"); + abort(); + return 0; + } + + virtual void emitLabel(uint64_t LabelID) { + assert(0 && "emit Label not implemented"); + abort(); + } + + + virtual void setModuleInfo(llvm::MachineModuleInfo* MMI) { } + /// JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE! virtual void startFunctionStub(unsigned StubSize, unsigned Alignment = 1) { assert(0 && "JIT specific function called!"); @@ -334,10 +348,8 @@ MachOWriter::~MachOWriter() { void MachOWriter::AddSymbolToSection(MachOSection *Sec, GlobalVariable *GV) { const Type *Ty = GV->getType()->getElementType(); unsigned Size = TM.getTargetData()->getABITypeSize(Ty); - unsigned Align = GV->getAlignment(); - if (Align == 0) - Align = TM.getTargetData()->getPrefTypeAlignment(Ty); - + unsigned Align = TM.getTargetData()->getPreferredAlignment(GV); + // Reserve space in the .bss section for this symbol while maintaining the // desired section alignment, which must be at least as much as required by // this symbol.