@@ -612,7 +612,8 @@ bool RISCVAsmBackend::evaluateTargetFixup(const MCFixup &Fixup,
612612 isPCRelFixupResolved (AUIPCTarget.getAddSym (), *AUIPCDF);
613613}
614614
615- void RISCVAsmBackend::maybeAddVendorReloc (const MCFragment &F, const MCFixup &Fixup) {
615+ void RISCVAsmBackend::maybeAddVendorReloc (const MCFragment &F,
616+ const MCFixup &Fixup) {
616617 MCContext &Ctx = Asm->getContext ();
617618
618619 StringRef VendorIdentifier;
@@ -629,9 +630,11 @@ void RISCVAsmBackend::maybeAddVendorReloc(const MCFragment &F, const MCFixup &Fi
629630 break ;
630631 }
631632
632- // Create a local symbol for the vendor relocation to reference. It's fine if the symbol has the same name as an existing symbol.
633+ // Create a local symbol for the vendor relocation to reference. It's fine if
634+ // the symbol has the same name as an existing symbol.
633635 MCSymbol *VendorSymbol = Ctx.createLocalSymbol (VendorIdentifier);
634- auto [It, Inserted] = VendorSymbols.try_emplace (VendorIdentifier, VendorSymbol);
636+ auto [It, Inserted] =
637+ VendorSymbols.try_emplace (VendorIdentifier, VendorSymbol);
635638
636639 if (Inserted) {
637640 // Setup the just-created symbol
@@ -645,8 +648,9 @@ void RISCVAsmBackend::maybeAddVendorReloc(const MCFragment &F, const MCFixup &Fi
645648 const MCExpr *VendorExpr = MCSymbolRefExpr::create (VendorSymbol, Ctx);
646649 MCFixup VendorFixup =
647650 MCFixup::create (Fixup.getOffset (), VendorExpr, ELF::R_RISCV_VENDOR);
648- // Explicitly create MCValue rather than using `VendorExpr->evaluateAsRelocatable`
649- // so that the absolute symbol is not evaluated to a constant.
651+ // Explicitly create MCValue rather than using
652+ // `VendorExpr->evaluateAsRelocatable` so that the absolute symbol is not
653+ // evaluated to constant 0.
650654 MCValue VendorTarget = MCValue::get (VendorSymbol);
651655 uint64_t VendorValue;
652656 Asm->getWriter ().recordRelocation (F, VendorFixup, VendorTarget, VendorValue);
0 commit comments