1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/test/Linker/alias-threadlocal.ll
Itay Bookstein c00c4a1533 [IR] Add missing GlobalAlias copying of ThreadLocalMode attribute
Summary:
Previously, GlobalAlias::copyAttributesFrom did not preserve ThreadLocalMode,
causing incorrect IR generation in IR linking flows. This patch pushes the code
responsible for copying this attribute from GlobalVariable::copyAttributesFrom
down to GlobalValue::copyAttributesFrom so that it is shared by GlobalAlias.
Fixes PR46297.

Reviewers: tejohnson, pcc, hans

Reviewed By: tejohnson, hans

Subscribers: hiraditya, ibookstein, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81605
2020-06-16 20:15:27 -07:00

10 lines
338 B
LLVM

; RUN: llvm-link %s %p/Inputs/alias-threadlocal-defs.ll -S -o - | FileCheck %s
; PR46297
; Verify that linking GlobalAliases preserves the thread_local attribute
; CHECK: @tlsvar1 = thread_local global i32 0, align 4
; CHECK: @tlsvar2 = hidden thread_local alias i32, i32* @tlsvar1
@tlsvar2 = external thread_local global i32, align 4