aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCAssembler.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-22 21:49:41 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-22 21:49:41 +0000
commitb5a274f1dcd3fddf2f18d66665f6ee98931a8223 (patch)
tree895ecadcbdeda14758266cf5493313ec5463593b /lib/MC/MCAssembler.cpp
parentbc8b13d5c72f9cb579190d974c96ed3e5a14942a (diff)
downloadexternal_llvm-b5a274f1dcd3fddf2f18d66665f6ee98931a8223.zip
external_llvm-b5a274f1dcd3fddf2f18d66665f6ee98931a8223.tar.gz
external_llvm-b5a274f1dcd3fddf2f18d66665f6ee98931a8223.tar.bz2
MC: Fix a few more cases we were passing an MCDataFragment when a MCFragment would do, and sprinkle in some const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAssembler.cpp')
-rw-r--r--lib/MC/MCAssembler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index 54510cc..8cb7270 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)