]> granicus.if.org Git - clang/commitdiff
Add a bit of a hack to deal with a failing testcase on darwin10 bots.
authorEric Christopher <echristo@gmail.com>
Wed, 17 Apr 2013 07:19:56 +0000 (07:19 +0000)
committerEric Christopher <echristo@gmail.com>
Wed, 17 Apr 2013 07:19:56 +0000 (07:19 +0000)
We currently emit an error message when you try to use thread local
storage on targets that don't support it and testing C++11 thread
locals will trip this. We don't want to xfail the test for all darwin
hosts so add a quick hack to check for darwin10 and disable the
test based on that. Only checking darwin10 because anything earlier
is really old and I don't have a list of what other hosts don't
support tls handy.

Alternate suggestions welcome!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179671 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/cxx11-thread-local.cpp
test/lit.cfg

index 011c8862523f4c2f369fa1b04a9255ef599027b6..e9b227970538235413f3713739cf7df01fbce3ca 100644 (file)
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -std=c++11 -verify %s
+// REQUIRES: thread_local_storage
 
 struct S {
   static thread_local int a;
index 6b0ad59c9f1f44e653787b5b9e640c6b7a0a16b7..8584f79c62d1526ff6599ae4085b244b13609ff0 100644 (file)
@@ -305,3 +305,7 @@ if config.llvm_use_sanitizer == "Address":
 if (config.llvm_use_sanitizer == "Memory" or
         config.llvm_use_sanitizer == "MemoryWithOrigins"):
     config.available_features.add("msan")
+
+# Thread local storage
+if not 'darwin10' in config.target_triple:
+    config.available_features.add("thread_local_storage")