Vedant Kumar 7840e607b9 [Bitcode] Address backwards compat bug in r342631
r342631 expanded bitc::METADATA_LOCATION by one element. The bitcode
metadata loader was changed in a backwards-incompatible way, leading to
crashes when disassembling old bitcode:

  assertion: empty() && "PlaceholderQueue hasn't been flushed before being destroyed"
  Assertion failed: (empty() && "PlaceholderQueue hasn't been flushed before being destroyed")

This commit teaches the metadata loader to assume that the newly-added
IsImplicitCode bit is 'false' when not present in old bitcode. I've added a
bitcode compat regression test.

rdar://44645820

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342678 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-20 18:59:33 +00:00
..