mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
clang-format bits of code to make another patch readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233203 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
489e5e5a86
commit
55f6e3b963
@ -86,11 +86,10 @@ public:
|
||||
///
|
||||
/// Clients are not required to answer precisely and may conservatively return
|
||||
/// false, even when a difference is fully resolved.
|
||||
bool
|
||||
IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,
|
||||
const MCSymbolRefExpr *A,
|
||||
const MCSymbolRefExpr *B,
|
||||
bool InSet) const;
|
||||
bool IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,
|
||||
const MCSymbolRefExpr *A,
|
||||
const MCSymbolRefExpr *B,
|
||||
bool InSet) const;
|
||||
|
||||
virtual bool
|
||||
IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,
|
||||
|
@ -442,13 +442,10 @@ bool MCExpr::evaluateAsAbsolute(int64_t &Res, const MCAssembler *Asm,
|
||||
}
|
||||
|
||||
/// \brief Helper method for \see EvaluateSymbolAdd().
|
||||
static void AttemptToFoldSymbolOffsetDifference(const MCAssembler *Asm,
|
||||
const MCAsmLayout *Layout,
|
||||
const SectionAddrMap *Addrs,
|
||||
bool InSet,
|
||||
const MCSymbolRefExpr *&A,
|
||||
const MCSymbolRefExpr *&B,
|
||||
int64_t &Addend) {
|
||||
static void AttemptToFoldSymbolOffsetDifference(
|
||||
const MCAssembler *Asm, const MCAsmLayout *Layout,
|
||||
const SectionAddrMap *Addrs, bool InSet, const MCSymbolRefExpr *&A,
|
||||
const MCSymbolRefExpr *&B, int64_t &Addend) {
|
||||
if (!A || !B)
|
||||
return;
|
||||
|
||||
@ -522,13 +519,11 @@ static void AttemptToFoldSymbolOffsetDifference(const MCAssembler *Asm,
|
||||
/// They might look redundant, but this function can be used before layout
|
||||
/// is done (see the object streamer for example) and having the Asm argument
|
||||
/// lets us avoid relaxations early.
|
||||
static bool EvaluateSymbolicAdd(const MCAssembler *Asm,
|
||||
const MCAsmLayout *Layout,
|
||||
const SectionAddrMap *Addrs,
|
||||
bool InSet,
|
||||
const MCValue &LHS,const MCSymbolRefExpr *RHS_A,
|
||||
const MCSymbolRefExpr *RHS_B, int64_t RHS_Cst,
|
||||
MCValue &Res) {
|
||||
static bool
|
||||
EvaluateSymbolicAdd(const MCAssembler *Asm, const MCAsmLayout *Layout,
|
||||
const SectionAddrMap *Addrs, bool InSet, const MCValue &LHS,
|
||||
const MCSymbolRefExpr *RHS_A, const MCSymbolRefExpr *RHS_B,
|
||||
int64_t RHS_Cst, MCValue &Res) {
|
||||
// FIXME: This routine (and other evaluation parts) are *incredibly* sloppy
|
||||
// about dealing with modifiers. This will ultimately bite us, one day.
|
||||
const MCSymbolRefExpr *LHS_A = LHS.getSymA();
|
||||
@ -695,14 +690,12 @@ bool MCExpr::EvaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
|
||||
// Negate RHS and add.
|
||||
return EvaluateSymbolicAdd(Asm, Layout, Addrs, InSet, LHSValue,
|
||||
RHSValue.getSymB(), RHSValue.getSymA(),
|
||||
-RHSValue.getConstant(),
|
||||
Res);
|
||||
-RHSValue.getConstant(), Res);
|
||||
|
||||
case MCBinaryExpr::Add:
|
||||
return EvaluateSymbolicAdd(Asm, Layout, Addrs, InSet, LHSValue,
|
||||
RHSValue.getSymA(), RHSValue.getSymB(),
|
||||
RHSValue.getConstant(),
|
||||
Res);
|
||||
RHSValue.getConstant(), Res);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,11 +17,9 @@ using namespace llvm;
|
||||
MCObjectWriter::~MCObjectWriter() {
|
||||
}
|
||||
|
||||
bool
|
||||
MCObjectWriter::IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,
|
||||
const MCSymbolRefExpr *A,
|
||||
const MCSymbolRefExpr *B,
|
||||
bool InSet) const {
|
||||
bool MCObjectWriter::IsSymbolRefDifferenceFullyResolved(
|
||||
const MCAssembler &Asm, const MCSymbolRefExpr *A, const MCSymbolRefExpr *B,
|
||||
bool InSet) const {
|
||||
// Modified symbol references cannot be resolved.
|
||||
if (A->getKind() != MCSymbolRefExpr::VK_None ||
|
||||
B->getKind() != MCSymbolRefExpr::VK_None)
|
||||
|
Loading…
Reference in New Issue
Block a user