]> granicus.if.org Git - llvm/commit
Implement a safer bitcode upgrade for DISubprogram.
authorAdrian Prantl <aprantl@apple.com>
Fri, 6 May 2016 22:53:06 +0000 (22:53 +0000)
committerAdrian Prantl <aprantl@apple.com>
Fri, 6 May 2016 22:53:06 +0000 (22:53 +0000)
commite6b649c5dfb19fa465ff5f4bcd10a5fa76bb50e2
tree2cb14b93145a5a2bde124c862cb3b49779ade366
parent26b46026813b7f52d3585032a5884e5a2bf4caa0
Implement a safer bitcode upgrade for DISubprogram.

The bitcode upgrade I added for DISubprogram in r266446 was based on the
assumption that the CU node for the subprogram was already materialized by the
time the DISubprogram is visited. This assumption may not hold true as future
versions of LLVM may decide to write out bitcode in a different order. This
patch corrects this by introducing a versioning bit next to the distinct flag to
unambiguously differentiate the new from the old record layouts.

Note for people stabilizing LLVM out-of-tree: This patch introduces a bitcode
incompatibility with llvm trunk revisions from r266446 — this commit. (But
D19987 will ensure that it degrades gracefully).

http://reviews.llvm.org/D20004
rdar://problem/26074194

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268816 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp