blob: 4e5cfef0a3f3804e11068b062e122759c9dea804 [file] [log] [blame]
Hans Wennborge48667f2012-08-01 18:53:19 +00001// Test that TLS is correctly considered supported or unsupported for the
2// different targets.
3
4// Linux supports TLS.
Hans Wennborgbbf9e3a2012-08-02 09:04:56 +00005// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only %s
6// RUN: %clang_cc1 -triple i386-pc-linux-gnu -fsyntax-only %s
Hans Wennborge48667f2012-08-01 18:53:19 +00007
8// Darwin supports TLS since 10.7.
Hans Wennborgbbf9e3a2012-08-02 09:04:56 +00009// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only %s
10// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fsyntax-only %s
Hans Wennborge48667f2012-08-01 18:53:19 +000011
12// FIXME: I thought it was supported actually?
Hans Wennborgbbf9e3a2012-08-02 09:04:56 +000013// RUN: not %clang_cc1 -triple x86_64-pc-win32 -fsyntax-only %s
14// RUN: not %clang_cc1 -triple i386-pc-win32 -fsyntax-only %s
Hans Wennborge48667f2012-08-01 18:53:19 +000015
16// OpenBSD does not suppport TLS.
Hans Wennborgbbf9e3a2012-08-02 09:04:56 +000017// RUN: not %clang_cc1 -triple x86_64-pc-openbsd -fsyntax-only %s
18// RUN: not %clang_cc1 -triple i386-pc-openbsd -fsyntax-only %s
Hans Wennborge48667f2012-08-01 18:53:19 +000019
Benjamin Krameref7bcea2012-11-08 12:59:15 +000020// Haiku does not suppport TLS.
21// RUN: not %clang_cc1 -triple i586-pc-haiku -fsyntax-only %s
22
Hans Wennborgbbf9e3a2012-08-02 09:04:56 +000023__thread int x;