X86 Disassembler Misplaced Assignment

In the file llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp in the function readDisplacement (line 1235),insn->consumedDisplacement is set to true on line 1245. In the proceeding switch statement, the same variable may be set to false, but the line immediately after the switch (line 1269) always sets it back to true. Here’s a copy of the source:


* readDisplacement - Consumes the displacement of an instruction.

Based on git blame, it looks like its been like since the file was created in 2009. Based on that we should probably just keep the one assignment above the switch.