@@ -70,10 +70,8 @@ MCFixupKindInfo RISCVAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
7070 {" fixup_riscv_12_i" , 20 , 12 , 0 },
7171 {" fixup_riscv_lo12_s" , 0 , 32 , 0 },
7272 {" fixup_riscv_pcrel_hi20" , 12 , 20 , MCFixupKindInfo::FKF_IsPCRel},
73- {" fixup_riscv_pcrel_lo12_i" , 20 , 12 ,
74- MCFixupKindInfo::FKF_IsPCRel | MCFixupKindInfo::FKF_IsTarget},
75- {" fixup_riscv_pcrel_lo12_s" , 0 , 32 ,
76- MCFixupKindInfo::FKF_IsPCRel | MCFixupKindInfo::FKF_IsTarget},
73+ {" fixup_riscv_pcrel_lo12_i" , 20 , 12 , MCFixupKindInfo::FKF_IsPCRel},
74+ {" fixup_riscv_pcrel_lo12_s" , 0 , 32 , MCFixupKindInfo::FKF_IsPCRel},
7775 {" fixup_riscv_jal" , 12 , 20 , MCFixupKindInfo::FKF_IsPCRel},
7876 {" fixup_riscv_branch" , 0 , 32 , MCFixupKindInfo::FKF_IsPCRel},
7977 {" fixup_riscv_rvc_jump" , 2 , 11 , MCFixupKindInfo::FKF_IsPCRel},
@@ -657,15 +655,16 @@ static const MCFixup *getPCRelHiFixup(const MCSpecifierExpr &Expr,
657655 return nullptr ;
658656}
659657
660- bool RISCVAsmBackend::evaluateTargetFixup ( const MCFixup &Fixup,
661- const MCValue &Target,
662- uint64_t &Value) {
658+ std::optional< bool > RISCVAsmBackend::evaluateFixup ( MCFixup &Fixup,
659+ MCValue &Target,
660+ uint64_t &Value) {
663661 const MCFixup *AUIPCFixup;
664662 const MCFragment *AUIPCDF;
665663 MCValue AUIPCTarget;
666664 switch (Fixup.getTargetKind ()) {
667665 default :
668- llvm_unreachable (" Unexpected fixup kind!" );
666+ // Use default handling for `Value` and `IsResolved`.
667+ return {};
669668 case RISCV::fixup_riscv_pcrel_lo12_i:
670669 case RISCV::fixup_riscv_pcrel_lo12_s: {
671670 AUIPCFixup =
0 commit comments