diff options
author | Fangrui Song <i@maskray.me> | 2024-07-01 16:23:43 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-07-01 16:23:43 -0700 |
commit | e25e8003ca2e9d623666b1cd65d4b98648416dd3 (patch) | |
tree | fdc454013407f31010dd77ad1903286ca1a3aab5 /llvm/lib/MC/MCExpr.cpp | |
parent | bf6f2c1c431943c69892d9b0355da91e95090601 (diff) | |
download | llvm-e25e8003ca2e9d623666b1cd65d4b98648416dd3.zip llvm-e25e8003ca2e9d623666b1cd65d4b98648416dd3.tar.gz llvm-e25e8003ca2e9d623666b1cd65d4b98648416dd3.tar.bz2 |
MCExpr::evaluateAsRelocatable: replace the MCAsmLayout parameter with MCAssembler
Continue the MCAsmLayout removal work started by 67957a45ee1ec42ae1671cdbfa0d73127346cc95.
Diffstat (limited to 'llvm/lib/MC/MCExpr.cpp')
-rw-r--r-- | llvm/lib/MC/MCExpr.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index 4b778e9..7e71111 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -788,11 +788,9 @@ static bool evaluateSymbolicAdd(const MCAssembler *Asm, return true; } -bool MCExpr::evaluateAsRelocatable(MCValue &Res, - const MCAsmLayout *Layout, +bool MCExpr::evaluateAsRelocatable(MCValue &Res, const MCAssembler *Asm, const MCFixup *Fixup) const { - MCAssembler *Assembler = Layout ? &Layout->getAssembler() : nullptr; - return evaluateAsRelocatableImpl(Res, Assembler, Fixup, nullptr, false); + return evaluateAsRelocatableImpl(Res, Asm, Fixup, nullptr, false); } bool MCExpr::evaluateAsValue(MCValue &Res, const MCAssembler &Asm) const { @@ -823,8 +821,7 @@ bool MCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm, MCAsmLayout *Layout = Asm ? Asm->getLayout() : nullptr; switch (getKind()) { case Target: - return cast<MCTargetExpr>(this)->evaluateAsRelocatableImpl(Res, Layout, - Fixup); + return cast<MCTargetExpr>(this)->evaluateAsRelocatableImpl(Res, Asm, Fixup); case Constant: Res = MCValue::get(cast<MCConstantExpr>(this)->getValue()); |