blob: 0953577b6ed23fd5ba1013035871c5807f41e78f [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.
5// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu %s
6// RUN: %clang_cc1 -triple i386-pc-linux-gnu %s
7
8// Darwin supports TLS since 10.7.
9// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 %s
10// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 %s
11
12// FIXME: I thought it was supported actually?
13// RUN: %clang_cc1 -verify -triple x86_64-pc-win32 %s
14// RUN: %clang_cc1 -verify -triple i386-pc-win32 %s
15
16// OpenBSD does not suppport TLS.
17// RUN: %clang_cc1 -verify -triple x86_64-pc-openbsd %s
18// RUN: %clang_cc1 -verify -triple i386-pc-openbsd %s
19
20__thread int x; // expected-error {{thread-local storage is unsupported for the current target}}