[llvm-commits] [llvm] r99218 - in /llvm/trunk: include/llvm/MC/MCAssembler.h lib/MC/MCAssembler.cpp
Daniel Dunbar
daniel at zuster.org
Mon Mar 22 14:49:41 PDT 2010
Author: ddunbar
Date: Mon Mar 22 16:49:41 2010
New Revision: 99218
URL: http://llvm.org/viewvc/llvm-project?rev=99218&view=rev
Log:
MC: Fix a few more cases we were passing an MCDataFragment when a MCFragment would do, and sprinkle in some const.
Modified:
llvm/trunk/include/llvm/MC/MCAssembler.h
llvm/trunk/lib/MC/MCAssembler.cpp
Modified: llvm/trunk/include/llvm/MC/MCAssembler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAssembler.h?rev=99218&r1=99217&r2=99218&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAssembler.h (original)
+++ llvm/trunk/include/llvm/MC/MCAssembler.h Mon Mar 22 16:49:41 2010
@@ -606,12 +606,12 @@
/// \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
Modified: llvm/trunk/lib/MC/MCAssembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=99218&r1=99217&r2=99218&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAssembler.cpp (original)
+++ llvm/trunk/lib/MC/MCAssembler.cpp Mon Mar 22 16:49:41 2010
@@ -234,8 +234,8 @@
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 @@
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)
More information about the llvm-commits
mailing list