Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LowerTypeTests: Propagate symver directives
Summary: This change fixes https://crbug.com/834474, a build failure caused by LowerTypeTests not preserving .symver symbol versioning directives for exported functions. Emit symver information to ThinLTO summary data and then propagate symver directives for exported functions to the merged module. Emitting symver information to the summaries increases the size of intermediate build artifacts for a Chromium build by less than 0.2%. Reviewers: pcc Reviewed By: pcc Subscribers: tejohnson, mehdi_amini, eraman, llvm-commits, eugenis, kcc Differential Revision: https://reviews.llvm.org/D45798 llvm-svn: 330387
- Loading branch information
Showing
8 changed files
with
150 additions
and
38 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
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
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
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,16 @@ | ||
; RUN: opt -S %s -lowertypetests -lowertypetests-summary-action=export -lowertypetests-read-summary=%S/Inputs/use-typeid1-typeid2.yaml | FileCheck %s | ||
; | ||
; CHECK: module asm ".symver exported_and_symver, alias1" | ||
; CHECK-NOT: .symver exported | ||
; CHECK-NOT: .symver symver | ||
|
||
target triple = "x86_64-unknown-linux" | ||
|
||
!cfi.functions = !{!0, !1} | ||
!symvers = !{!3, !4} | ||
|
||
!0 = !{!"exported_and_symver", i8 2, !2} | ||
!1 = !{!"exported", i8 2, !2} | ||
!2 = !{i64 0, !"typeid1"} | ||
!3 = !{!"exported_and_symver", !"alias1"} | ||
!4 = !{!"symver", !"alias2"} |
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,22 @@ | ||
; RUN: opt -thinlto-bc -o %t %s | ||
; RUN: llvm-modextract -n 1 -o - %t | llvm-dis | FileCheck %s | ||
|
||
target triple = "x86_64-unknown-linux-gnu" | ||
|
||
module asm ".symver used, used@VER" | ||
module asm ".symver unused, unused@VER" | ||
module asm ".symver variable, variable@VER" | ||
|
||
declare !type !0 void @used() | ||
declare !type !0 void @unused() | ||
@variable = global i32 0 | ||
|
||
define i32* @use() { | ||
call void @used() | ||
ret i32* @variable | ||
} | ||
|
||
; CHECK: !symvers = !{![[SYMVER:[0-9]+]]} | ||
; CHECK: ![[SYMVER]] = !{!"used", !"used@VER"} | ||
|
||
!0 = !{i64 0, !"_ZTSFvvE"} |