1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/test/Linker/appending-global-proto.ll
Sergey Dmitriev d19ff967e7 [llvm-link] Fix for an assertion when linking global with appending linkage
This patch fixes llvm-link assertion when linking external variable
declaration with a definition with appending linkage.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95126
2021-01-23 00:10:42 -08:00

12 lines
469 B
LLVM

; RUN: llvm-link %s %p/Inputs/appending-global.ll -S -o - | FileCheck %s
; RUN: llvm-link %p/Inputs/appending-global.ll %s -S -o - | FileCheck %s
; Checks that we can link global variable with appending linkage with the
; existing external declaration.
; CHECK-DAG: @var = appending global [1 x i8*] undef
; CHECK-DAG: @use = global [1 x i8*] [i8* bitcast ([1 x i8*]* @var to i8*)]
@var = external global i8*
@use = global [1 x i8*] [i8* bitcast (i8** @var to i8*)]