diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-25 02:00:02 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-25 02:00:02 +0000 |
commit | 2522dd1c49ea402fe3d48ec504cc4810059dac9e (patch) | |
tree | a0a6f97c82839d7a5679fc4028c7bd21a7c57102 /llvm/lib/MC/MachObjectWriter.cpp | |
parent | 5bbda5130fe1e12f060ab108786d676980820a87 (diff) | |
download | bcm5719-llvm-2522dd1c49ea402fe3d48ec504cc4810059dac9e.tar.gz bcm5719-llvm-2522dd1c49ea402fe3d48ec504cc4810059dac9e.zip |
MC: Route access to Fragment offset and effective size through MCAsmLayout.
llvm-svn: 99473
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/MachObjectWriter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp index 39dfac158a5..72e581bc0ab 100644 --- a/llvm/lib/MC/MachObjectWriter.cpp +++ b/llvm/lib/MC/MachObjectWriter.cpp @@ -461,7 +461,7 @@ public: unsigned Log2Size = getFixupKindLog2Size(Fixup.Kind); // See <reloc.h>. - uint32_t Address = Fragment->getOffset() + Fixup.Offset; + uint32_t Address = Layout.getFragmentOffset(Fragment) + Fixup.Offset; int64_t Value = 0; unsigned Index = 0; unsigned IsExtern = 0; @@ -645,7 +645,7 @@ public: const MCFragment *Fragment, const MCAsmFixup &Fixup, MCValue Target, uint64_t &FixedValue) { - uint32_t Address = Fragment->getOffset() + Fixup.Offset; + uint32_t Address = Layout.getFragmentOffset(Fragment) + Fixup.Offset; unsigned IsPCRel = isFixupKindPCRel(Fixup.Kind); unsigned Log2Size = getFixupKindLog2Size(Fixup.Kind); unsigned Type = RIT_Vanilla; @@ -723,7 +723,7 @@ public: } // See <reloc.h>. - uint32_t Address = Fragment->getOffset() + Fixup.Offset; + uint32_t Address = Layout.getFragmentOffset(Fragment) + Fixup.Offset; uint32_t Value = 0; unsigned Index = 0; unsigned IsExtern = 0; @@ -1036,7 +1036,7 @@ public: // Write the actual section data. for (MCAssembler::const_iterator it = Asm.begin(), ie = Asm.end(); it != ie; ++it) - Asm.WriteSectionData(it, Writer); + Asm.WriteSectionData(it, Layout, Writer); // Write the extra padding. WriteZeros(SectionDataPadding); |