]> granicus.if.org Git - llvm/commit
Merging r294318:
authorHans Wennborg <hans@hanshq.net>
Tue, 7 Feb 2017 21:15:12 +0000 (21:15 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 7 Feb 2017 21:15:12 +0000 (21:15 +0000)
commit043de30835f38132fe3626efdcb975143d992087
treea7aff1b0ebab933be7995fac5a36e999fee8eaca
parent46cd6791278cca5b732346a7bc15125087cfcfd1
Merging r294318:
------------------------------------------------------------------------
r294318 | adrian | 2017-02-07 09:35:41 -0800 (Tue, 07 Feb 2017) | 12 lines

Fix the bitcode upgrade for DIGlobalVariable in a DIImportedEntity context.

The bitcode upgrade for DIGlobalVariable unconditionally wrapped
DIGlobalVariables in a DIGlobalVariableExpression. When a
DIGlobalVariable is referenced by a DIImportedEntity, however, this is
wrong. This patch fixes the bitcode upgrade by deferring the creation
of DIGlobalVariableExpressions until we know the context of the
DIGlobalVariable.

<rdar://problem/30134279>

Differential Revision: https://reviews.llvm.org/D29349
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@294352 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Reader/MetadataLoader.cpp
test/Bitcode/DIGlobalVariableExpression.ll
test/Bitcode/DIGlobalVariableExpression.ll.bc
test/Bitcode/dityperefs-3.8.ll