The function a) returned 32-bits when in DWARF64, the PrologueLength field is 64-bits in size, and b) didn't work for DWARF version 5.
Also deleted some related dead code. With this deletion, getLength is itself dead, but another change is about to make use of it.
I'd just use += 2 here, with a comment. sizeof(getAddressSize()) took a second to parse, and assumes the getter returns a type that is the same size as the field.