[PATCH] Bitrig uses TLS
Patrick Wildt
mail at patrick-wildt.de
Thu May 1 15:17:57 PDT 2014
Does this look better?
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 6fdd0d0..a514466 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -445,7 +445,6 @@ protected:
public:
BitrigTargetInfo(const llvm::Triple &Triple) : OSTargetInfo<Target>(Triple) {
this->UserLabelPrefix = "";
- this->TLSSupported = false;
this->MCountName = "__mcount";
}
};
diff --git a/test/Sema/tls.c b/test/Sema/tls.c
index 9da7bc8..f32206e 100644
--- a/test/Sema/tls.c
+++ b/test/Sema/tls.c
@@ -19,4 +19,8 @@
// Haiku does not suppport TLS.
// RUN: not %clang_cc1 -triple i586-pc-haiku -fsyntax-only %s
+// Bitrig suppports TLS.
+// RUN: %clang_cc1 -triple x86_64-pc-bitrig -fsyntax-only %s
+// RUN: %clang_cc1 -triple armv6-unknown-bitrig -fsyntax-only %s
+
__thread int x;
On Thu, May 01, 2014 at 03:05:37PM -0700, Richard Smith wrote:
> We should at least have a test that we don't reject TLS for Bitrig. The
> right place to add such a test is test/Sema/tls.c
>
> On Thu, May 1, 2014 at 2:55 PM, Reid Kleckner <rnk at google.com> wrote:
>
> > I wouldn't test it, since the codepaths are covered by other targets. You
> > can drop the assignment entirely. The default value of TLSSupported is
> > true.
> >
> >
> > On Thu, May 1, 2014 at 1:49 PM, Patrick Wildt <mail at patrick-wildt.de>wrote:
> >
> >> Hi,
> >>
> >> Bitrig now does TLS, so it should be marked as supported in the
> >> TargetInfo.
> >>
> >> Does this patch need a test? Is there some test I can add
> >> a Bitrig target to?
> >>
> >> \Patrick
> >>
> >> diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
> >> index 6fdd0d0..387e3d9 100644
> >> --- a/lib/Basic/Targets.cpp
> >> +++ b/lib/Basic/Targets.cpp
> >> @@ -445,7 +445,7 @@ protected:
> >> public:
> >> BitrigTargetInfo(const llvm::Triple &Triple) :
> >> OSTargetInfo<Target>(Triple) {
> >> this->UserLabelPrefix = "";
> >> - this->TLSSupported = false;
> >> + this->TLSSupported = true;
> >> this->MCountName = "__mcount";
> >> }
> >> };
> >> _______________________________________________
> >> cfe-commits mailing list
> >> cfe-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >>
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
> >
More information about the cfe-commits
mailing list