Sometimes += is used to move the location counter.
Example from the wild is:
.dbg_excpt _DBG_EXCPT_ADDR (NOLOAD) :
{
. += (DEFINED (_DEBUGGER) ? 0x8 : 0x0);https://github.com/chipKIT32/pic32-Arduino-USB-Bootloader-original/blob/master/boot-linkerscript.ld
Patch implements it and opens way for others type of assignments (-= *= etc), though I think only += is
actual to support.
It can be like this. You don't have to call combine() to handle operators that is known at compile time.
StringRef Op = next(); assert(Op == "=" || Op == "+="); Expr E = readExpr(); if (Op == "+=") E = [=](uint64_t Dot) { return getSymbolValue(Name, Dot) + E(Dot); }; auto *Cmd = new SymbolAssignment(Name, E); ...