MC: Fix a few more cases we were passing an MCDataFragment when a MCFragment would...
authorDaniel Dunbar <daniel@zuster.org>
Mon, 22 Mar 2010 21:49:41 +0000 (21:49 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 22 Mar 2010 21:49:41 +0000 (21:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99218 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCAssembler.h
lib/MC/MCAssembler.cpp

index 63b5e49f2db900e7da601933aef5fb6e1b7abbd7..8a7a7853c6d282ae8044f5bb5cd0b12e42c11a77 100644 (file)
@@ -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
index 54510cce901aa752b6343ad535d432c98b0aad9c..8cb72706fec083ef3aa2d55aa28035fe58513efb 100644 (file)
@@ -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)