diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2010-02-11 21:29:29 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2010-02-11 21:29:29 +0000 |
| commit | 5e65c6fd5111444a7a794feac0f82fd6eecba891 (patch) | |
| tree | a95fa3e4cd281cc784445ab81312623c424c280d /lib/MC/MCAssembler.cpp | |
| parent | 79eb84f5d46fc3b7ac35ecad8c6d1c4b6bf4dae6 (diff) | |
| download | external_llvm-5e65c6fd5111444a7a794feac0f82fd6eecba891.zip external_llvm-5e65c6fd5111444a7a794feac0f82fd6eecba891.tar.gz external_llvm-5e65c6fd5111444a7a794feac0f82fd6eecba891.tar.bz2 | |
MC: Move MCSectionData::Fixup out to MCAsmFixup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAssembler.cpp')
| -rw-r--r-- | lib/MC/MCAssembler.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index bdc886b..682b505 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -403,7 +403,7 @@ public: uint32_t Word1; }; void ComputeScatteredRelocationInfo(MCAssembler &Asm, - MCSectionData::Fixup &Fixup, + MCAsmFixup &Fixup, const MCValue &Target, DenseMap<const MCSymbol*,MCSymbolData*> &SymbolMap, std::vector<MachRelocationEntry> &Relocs) { @@ -454,7 +454,7 @@ public: } void ComputeRelocationInfo(MCAssembler &Asm, - MCSectionData::Fixup &Fixup, + MCAsmFixup &Fixup, DenseMap<const MCSymbol*,MCSymbolData*> &SymbolMap, std::vector<MachRelocationEntry> &Relocs) { MCValue Target; @@ -912,15 +912,15 @@ MCSectionData::MCSectionData(const MCSection &_Section, MCAssembler *A) A->getSectionList().push_back(this); } -const MCSectionData::Fixup * -MCSectionData::LookupFixup(const MCFragment *Fragment, uint64_t Offset) const { +const MCAsmFixup *MCSectionData::LookupFixup(const MCFragment *Fragment, + uint64_t Offset) const { // Use a one level cache to turn the common case of accessing the fixups in // order into O(1) instead of O(N). unsigned i = LastFixupLookup, Count = Fixups.size(), End = Fixups.size(); if (i >= End) i = 0; while (Count--) { - const Fixup &F = Fixups[i]; + const MCAsmFixup &F = Fixups[i]; if (F.Fragment == Fragment && F.Offset == Offset) { LastFixupLookup = i; return &F; @@ -998,8 +998,7 @@ void MCAssembler::LayoutSection(MCSectionData &SD) { // Otherwise, add fixups for the values. for (uint64_t i = 0, e = FF.getCount(); i != e; ++i) { - MCSectionData::Fixup Fix(F, i * FF.getValueSize(), - FF.getValue(),FF.getValueSize()); + MCAsmFixup Fix(F, i*FF.getValueSize(), FF.getValue(),FF.getValueSize()); SD.getFixups().push_back(Fix); } break; @@ -1107,7 +1106,7 @@ static void WriteFileData(raw_ostream &OS, const MCFragment &F, // Find the fixup. // // FIXME: Find a better way to write in the fixes. - const MCSectionData::Fixup *Fixup = + const MCAsmFixup *Fixup = F.getParent()->LookupFixup(&F, i * FF.getValueSize()); assert(Fixup && "Missing fixup for fill value!"); Value = Fixup->FixedValue; |
