diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-05-26 15:18:56 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-05-26 15:18:56 +0000 |
commit | c90e30aa6f3792a460202017523171f435e2ba34 (patch) | |
tree | 64b89bfe8da26c13607117554d4cf01ca98e0acc /lib/MC/MCMachOStreamer.cpp | |
parent | 0dd0c941c9eb4adc13319ed7adcaffe58a68d294 (diff) |
MC: Eliminate MCAsmFixup, replace with MCFixup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104699 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCMachOStreamer.cpp')
-rw-r--r-- | lib/MC/MCMachOStreamer.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp index eaa89fac64..f49acf28b9 100644 --- a/lib/MC/MCMachOStreamer.cpp +++ b/lib/MC/MCMachOStreamer.cpp @@ -376,8 +376,9 @@ void MCMachOStreamer::EmitValue(const MCExpr *Value, unsigned Size, for (unsigned i = 0; i != Size; ++i) DF->getContents().push_back(uint8_t(AbsValue >> (i * 8))); } else { - DF->addFixup(MCAsmFixup(DF->getContents().size(), *AddValueSymbols(Value), - MCFixup::getKindForSize(Size))); + DF->addFixup(MCFixup::Create(DF->getContents().size(), + AddValueSymbols(Value), + MCFixup::getKindForSize(Size))); DF->getContents().resize(DF->getContents().size() + Size, 0); } } @@ -434,12 +435,9 @@ void MCMachOStreamer::EmitInstruction(const MCInst &Inst) { VecOS.flush(); // FIXME: Eliminate this copy. - SmallVector<MCAsmFixup, 4> AsmFixups; - for (unsigned i = 0, e = Fixups.size(); i != e; ++i) { - MCFixup &F = Fixups[i]; - AsmFixups.push_back(MCAsmFixup(F.getOffset(), *F.getValue(), - F.getKind())); - } + SmallVector<MCFixup, 4> AsmFixups; + for (unsigned i = 0, e = Fixups.size(); i != e; ++i) + AsmFixups.push_back(Fixups[i]); // See if we might need to relax this instruction, if so it needs its own // fragment. |