mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
Use references and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122405 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f01212489b
commit
33a38a1b5a
@ -90,7 +90,7 @@ public:
|
||||
/// @param Res - The relocatable value, if evaluation succeeds.
|
||||
/// @param Layout - The assembler layout object to use for evaluating values.
|
||||
/// @result - True on success.
|
||||
bool EvaluateAsRelocatable(MCValue &Res, const MCAsmLayout *Layout = 0) const;
|
||||
bool EvaluateAsRelocatable(MCValue &Res, const MCAsmLayout &Layout) const;
|
||||
|
||||
/// @}
|
||||
|
||||
|
@ -215,7 +215,7 @@ bool MCAssembler::EvaluateFixup(const MCAsmLayout &Layout,
|
||||
MCValue &Target, uint64_t &Value) const {
|
||||
++stats::EvaluateFixup;
|
||||
|
||||
if (!Fixup.getValue()->EvaluateAsRelocatable(Target, &Layout))
|
||||
if (!Fixup.getValue()->EvaluateAsRelocatable(Target, Layout))
|
||||
report_fatal_error("expected relocatable expression");
|
||||
|
||||
// FIXME: How do non-scattered symbols work in ELF? I presume the linker
|
||||
|
@ -409,12 +409,9 @@ static bool EvaluateSymbolicAdd(const MCAssembler *Asm,
|
||||
}
|
||||
|
||||
bool MCExpr::EvaluateAsRelocatable(MCValue &Res,
|
||||
const MCAsmLayout *Layout) const {
|
||||
if (Layout)
|
||||
return EvaluateAsRelocatableImpl(Res, &Layout->getAssembler(), Layout,
|
||||
0, false);
|
||||
else
|
||||
return EvaluateAsRelocatableImpl(Res, 0, 0, 0, false);
|
||||
const MCAsmLayout &Layout) const {
|
||||
return EvaluateAsRelocatableImpl(Res, &Layout.getAssembler(), &Layout,
|
||||
0, false);
|
||||
}
|
||||
|
||||
bool MCExpr::EvaluateAsRelocatableImpl(MCValue &Res,
|
||||
|
Loading…
x
Reference in New Issue
Block a user