forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-link] Fix crash when materializing appending global
This patch fixes llvm-link crash when materializing global variable with appending linkage and initializer that depends on another global with appending linkage. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D95329
- Loading branch information
1 parent
8b11714
commit 13cedca
Showing
2 changed files
with
17 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,10 @@ | ||
; RUN: llvm-link %s -S -o - | FileCheck %s | ||
|
||
; Check that llvm-link does not crash when materializing appending global with | ||
; initializer depending on another appending global. | ||
|
||
; CHECK-DAG: @use = appending global [1 x i8*] [i8* bitcast ([1 x i8*]* @var to i8*)] | ||
; CHECK-DAG: @var = appending global [1 x i8*] undef | ||
|
||
@use = appending global [1 x i8*] [i8* bitcast ([1 x i8*]* @var to i8*)] | ||
@var = appending global [1 x i8*] undef |