Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ThinLTOBitcodeWriter: Include globals associated with type metadata g…
…lobals in the merged module. Globals that are associated with globals with type metadata need to appear in the merged module because they will reference the global's section directly. Differential Revision: https://reviews.llvm.org/D65312 llvm-svn: 367242
- Loading branch information
Showing
2 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t %s | ||
; RUN: llvm-modextract -b -n 0 -o - %t | llvm-dis | FileCheck --check-prefix=M0 %s | ||
; RUN: llvm-modextract -b -n 1 -o - %t | llvm-dis | FileCheck --check-prefix=M1 %s | ||
|
||
; M0: @g = external constant | ||
; M0-NOT: @assoc | ||
; M1: @g = constant i8 1 | ||
; M1: @assoc = private constant i8 2 | ||
|
||
@g = constant i8 1, !type !0 | ||
@assoc = private constant i8 2, !associated !1 | ||
|
||
!0 = !{i32 0, !"typeid"} | ||
!1 = !{i8* @g} |