HomePhabricator

[RISCV][NFC] Make logic in RISCVMCCodeEmitter::getImmOpValue more defensive

Description

[RISCV][NFC] Make logic in RISCVMCCodeEmitter::getImmOpValue more defensive

As pointed out by @sabuasal in a comment on D23568, the logic in
RISCVMCCodeEmitter::getImmOpValue could be more defensive. Although with the
current instruction definitions it is always the case that VK_RISCV_LO is
always used with either an I- or S-format instruction, this may not always be
the case in the future. Add a check to ensure we will get an assertion in
debug builds if that changes.

Details

Committed
asbFeb 22 2018, 5:24 AM
Parents
rL325774: [clangd] Allow embedders some control over when diagnostics are generated.
Branches
Unknown
Tags
Unknown