浏览代码

[RISCV] Mark TLS as supported

Inform Clang that TLS is implemented by LLVM for RISC-V

Differential Revision: https://reviews.llvm.org/D57055



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363776 91177308-0d34-0410-b5e6-96231b3b80d8
Lewis Revill 6 年之前
父节点
当前提交
cc8f460143
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 0 1
      lib/Basic/Targets/RISCV.h
  2. 2 0
      test/CodeGen/thread-specifier.c

+ 0 - 1
lib/Basic/Targets/RISCV.h

@@ -35,7 +35,6 @@ public:
   RISCVTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
   RISCVTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
       : TargetInfo(Triple), HasM(false), HasA(false), HasF(false),
       : TargetInfo(Triple), HasM(false), HasA(false), HasF(false),
         HasD(false), HasC(false) {
         HasD(false), HasC(false) {
-    TLSSupported = false;
     LongDoubleWidth = 128;
     LongDoubleWidth = 128;
     LongDoubleAlign = 128;
     LongDoubleAlign = 128;
     LongDoubleFormat = &llvm::APFloat::IEEEquad();
     LongDoubleFormat = &llvm::APFloat::IEEEquad();

+ 2 - 0
test/CodeGen/thread-specifier.c

@@ -1,4 +1,6 @@
 // RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
 // RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple riscv32 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple riscv64 -emit-llvm -o - %s | FileCheck %s
 
 
 // CHECK: @b = external thread_local global
 // CHECK: @b = external thread_local global
 // CHECK: @d.e = internal thread_local global
 // CHECK: @d.e = internal thread_local global