[LLVMdev] Using the unused "version" field in the bitcode wrapper (redux)

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Nov 7 10:42:59 PST 2014


Reading the bitcode reader while working on another issues I found
that we already have a version in the bitcode itself (not the darwin
wrapper) and it is used! It is stored with the
bitc::MODULE_CODE_VERSION. It is used to select relative ids, which
impacts the entire bitcode, and so it makes sense to be based on a
version.

If we ever have a new feature that could not be otherwise detected,
bumping the number is a reasonable way of making sure old versions of
llvm will reject new bitcode instead of misinterpreting it.

*If* once we get to 4.0 it looks like there would be a big win by
dropping support for 3.x in 4.1 *and* the stuff we want to drop
support for is not easy to identify, then bumping this in 4.0 would
also make sense.

Cheers,
Rafael



More information about the llvm-dev mailing list