Insert a new `versionInfo` field into the `.rs.info` symbol

This allows us to warn the user when compiling bitcode with different
frontend / backend versions both at compile time, as well as debug time
(a check is to be inserted into lldb as well).

- Extract from the bitcode metadata the version of LLVM slang has
  generated used to emit bitcode (if possible) and embed it alongside
  the version of LLVM this version of libbcc is linked against. This
  allows us to notify the user of any possible known or unknown
  incompatibilities between the version, and in our case let the
  debugger track the difference between versions of LLVM used to
  generate the debug symbols which is known to have no cross-version
  compatibility guarantees
- update bcc to emit a warning when the bitcode version doesn't match
- Add positive version match tests + compatibility tests + negative
  tests

Test: aosp_x86_64-eng (emulator)
 - libbcc/tests
 - RsTest (32-bit, 64-bit)
 - cts -m RenderscriptTest
 - rs/lldb (required various other pending CLs)

Change-Id: I3b0ad8bbaba1846adb615da0988980cb1c95ad02
Signed-off-by: Luke Drummond <luke.drummond@codeplay.com>
3 files changed