]> granicus.if.org Git - clang/commitdiff
Basic: mark TLS as supported on Windows on ARM
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 4 Feb 2016 05:05:23 +0000 (05:05 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 4 Feb 2016 05:05:23 +0000 (05:05 +0000)
LLVM can now lower TLS access as per the MS ABI on ARM.  This enables the
generation of TLS access for Windows on ARM.

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

lib/Basic/Targets.cpp
test/CodeGen/windows-on-arm-tls-support.c [new file with mode: 0644]

index 09c8705627449fe887f52745ad0acc4c18f70b0b..dcf6ca9585018284bf57f73c59e1a6559832c0d8 100644 (file)
@@ -5127,7 +5127,6 @@ class WindowsARMTargetInfo : public WindowsTargetInfo<ARMleTargetInfo> {
 public:
   WindowsARMTargetInfo(const llvm::Triple &Triple)
     : WindowsTargetInfo<ARMleTargetInfo>(Triple), Triple(Triple) {
-    TLSSupported = false;
     WCharType = UnsignedShort;
     SizeType = UnsignedInt;
     UserLabelPrefix = "";
diff --git a/test/CodeGen/windows-on-arm-tls-support.c b/test/CodeGen/windows-on-arm-tls-support.c
new file mode 100644 (file)
index 0000000..dfb8b27
--- /dev/null
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -triple thumbv7--windows -fms-extensions -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+__declspec(thread) int i;
+