diff options
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 4 | ||||
-rw-r--r-- | lib/MC/MCAssembler.cpp | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 63b5e49f2d..8a7a7853c6 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -606,12 +606,12 @@ private: /// \arg Value result is fixed, otherwise the value may change due to /// relocation. bool EvaluateFixup(const MCAsmLayout &Layout, - MCAsmFixup &Fixup, MCDataFragment *DF, + const MCAsmFixup &Fixup, const MCFragment *DF, MCValue &Target, uint64_t &Value) const; /// Check whether a fixup can be satisfied, or whether it needs to be relaxed /// (increased in size, in order to hold its value correctly). - bool FixupNeedsRelaxation(MCAsmFixup &Fixup, MCDataFragment *DF, + bool FixupNeedsRelaxation(const MCAsmFixup &Fixup, const MCFragment *DF, const MCAsmLayout &Layout) const; /// LayoutSection - Assign offsets and sizes to the fragments in the section diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index 54510cce90..8cb72706fe 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -234,8 +234,8 @@ const MCSymbolData *MCAssembler::getAtom(const MCSymbolData *SD) const { return getAtomForAddress(SD->getFragment()->getParent(), SD->getAddress()); } -bool MCAssembler::EvaluateFixup(const MCAsmLayout &Layout, MCAsmFixup &Fixup, - MCDataFragment *DF, +bool MCAssembler::EvaluateFixup(const MCAsmLayout &Layout, + const MCAsmFixup &Fixup, const MCFragment *DF, MCValue &Target, uint64_t &Value) const { if (!Fixup.Value->EvaluateAsRelocatable(Target, &Layout)) llvm_report_error("expected relocatable expression"); @@ -584,7 +584,8 @@ void MCAssembler::Finish() { OS.flush(); } -bool MCAssembler::FixupNeedsRelaxation(MCAsmFixup &Fixup, MCDataFragment *DF, +bool MCAssembler::FixupNeedsRelaxation(const MCAsmFixup &Fixup, + const MCFragment *DF, const MCAsmLayout &Layout) const { // Currently we only need to relax X86::reloc_pcrel_1byte. if (unsigned(Fixup.Kind) != X86::reloc_pcrel_1byte) |