diff options
Diffstat (limited to 'clang/test/CodeGenCXX/dso-local-executable.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/dso-local-executable.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/dso-local-executable.cpp b/clang/test/CodeGenCXX/dso-local-executable.cpp index cc8d50f09c9..ceb649e074a 100644 --- a/clang/test/CodeGenCXX/dso-local-executable.cpp +++ b/clang/test/CodeGenCXX/dso-local-executable.cpp @@ -1,5 +1,6 @@ // RUN: %clang_cc1 -triple x86_64-pc-linux -mrelocation-model static -O1 -emit-llvm %s -o - | FileCheck --check-prefix=STATIC %s // RUN: %clang_cc1 -triple x86_64-pc-linux -mrelocation-model static -fno-plt -O1 -emit-llvm %s -o - | FileCheck --check-prefix=NOPLT %s +// RUN: %clang_cc1 -triple x86_64-w64-mingw32 -O1 -emit-llvm %s -o - | FileCheck --check-prefix=MINGW %s // STATIC-DAG: @_ZTV1C = linkonce_odr dso_local unnamed_addr constant // STATIC-DAG: @_ZTS1C = linkonce_odr dso_local constant @@ -19,6 +20,15 @@ // NOPLT-DAG: define dso_local void @_ZN1CC1Ev( // NOPLT-DAG: define linkonce_odr dso_local void @_ZN1C3fooEv( +// MINGW-DAG: @_ZTV1C = linkonce_odr dso_local unnamed_addr constant +// MINGW-DAG: @_ZTS1C = linkonce_odr dso_local constant +// MINGW-DAG: @_ZTI1C = linkonce_odr dso_local constant +// MINGW-DAG: @_ZZ14useStaticLocalvE3obj = linkonce_odr dso_local global +// MINGW-DAG: @_ZGVZN5guard1gEvE1a = linkonce_odr dso_local global +// MINGW-DAG: define dso_local void @_ZN1CC2Ev( +// MINGW-DAG: define dso_local void @_ZN1CC1Ev( +// MINGW-DAG: define linkonce_odr dso_local void @_ZN1C3fooEv( + struct C { C(); virtual void foo() {} @@ -48,15 +58,23 @@ int h() { } // namespace guard +// STATIC-DAG: @_ZN5test23barIiE1xE = available_externally dso_local constant i32 // STATIC-DAG: define available_externally dso_local void @_ZN5test23barIcEC1Ev( +// NOPLT-DAG: @_ZN5test23barIiE1xE = available_externally dso_local constant i32 // NOPLT-DAG: define available_externally void @_ZN5test23barIcEC1Ev( +// MINGW-DAG: @_ZN5test23barIiE1xE = available_externally constant i32 +// MINGW-DAG: define available_externally dso_local void @_ZN5test23barIcEC1Ev( namespace test2 { void foo(); template <typename T> struct bar { virtual void zed(); + static const int x = 42; bar() { foo(); } }; extern template class bar<char>; bar<char> abc; +const int *getX() { + return &bar<int>::x; +} } // namespace test2 |