llvm-project/clang/test/CodeGenCXX/mingw-thread-local.cpp
Martin Storsjö 86c9831bb4 [ItaniumCXXABI] Don't mark an extern_weak init function as dso_local on windows
Since 6bf108d77a3c, we try to not mark extern_weak symbols as
dso_local, to allow using COFF stubs for references to those symbols
(as the symbol may be missing, resolving to an absolute address zero,
outside of the current DSO).

Differential Revision: https://reviews.llvm.org/D71716
2019-12-23 12:13:48 +02:00

10 lines
198 B
C++

// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-w64-mingw32 | FileCheck %s
extern thread_local int var;
int get() {
return var;
}
// CHECK: declare extern_weak void @_ZTH3var()