[PATCH] D124504: Remove --no-opaque-pointers in test/cxx2a-thread-local-constinit.cpp
Chuanqi Xu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 27 00:05:50 PDT 2022
ChuanqiXu created this revision.
ChuanqiXu added a reviewer: nikic.
ChuanqiXu added a project: clang.
Herald added a project: All.
ChuanqiXu requested review of this revision.
Herald added a subscriber: cfe-commits.
The option `--no-opaque-pointers` in test/cxx2a-thread-local-constinit.cpp blocks my current works. I feel it should be good to remove `--no-opaque-pointers` in clang tests. But I want to consult experts to be sure about this.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124504
Files:
clang/test/CodeGenCXX/cxx2a-thread-local-constinit.cpp
Index: clang/test/CodeGenCXX/cxx2a-thread-local-constinit.cpp
===================================================================
--- clang/test/CodeGenCXX/cxx2a-thread-local-constinit.cpp
+++ clang/test/CodeGenCXX/cxx2a-thread-local-constinit.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux-gnu -std=c++2a %s -emit-llvm -o - | FileCheck --check-prefix=CHECK --check-prefix=LINUX %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin12 -std=c++2a %s -emit-llvm -o - | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++2a %s -emit-llvm -o - | FileCheck --check-prefix=CHECK --check-prefix=LINUX %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin12 -std=c++2a %s -emit-llvm -o - | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s
// Check variable definitions/declarations. Note that on Darwin, typically the
// variable's symbol is marked internal, and only the _ZTW function is
@@ -19,7 +19,7 @@
extern thread_local constinit int b;
// CHECK-LABEL: define{{.*}} i32 @_Z5get_av()
-// CHECK: call {{(cxx_fast_tlscc )?}}i32* @_ZTW1a()
+// CHECK: call {{(cxx_fast_tlscc )?}}ptr @_ZTW1a()
// CHECK: }
int get_a() { return a; }
@@ -31,7 +31,7 @@
// CHECK-LABEL: define{{.*}} i32 @_Z5get_bv()
// CHECK-NOT: call
-// CHECK: load i32, i32* @b
+// CHECK: load i32, ptr @b
// CHECK-NOT: call
// CHECK: }
int get_b() { return b; }
@@ -41,8 +41,8 @@
extern thread_local int c;
// CHECK-LABEL: define{{.*}} i32 @_Z5get_cv()
-// LINUX: call {{(cxx_fast_tlscc )?}}i32* @_ZTW1c()
-// CHECK: load i32, i32* %
+// LINUX: call {{(cxx_fast_tlscc )?}}ptr @_ZTW1c()
+// CHECK: load i32, ptr %
// CHECK: }
int get_c() { return c; }
@@ -52,7 +52,7 @@
// LINUX-LABEL: define weak_odr {{.*}} @_ZTW1c()
// CHECK-NOT: br i1
// CHECK-NOT: call
-// CHECK: ret i32* @c
+// CHECK: ret ptr @c
// CHECK: }
thread_local int c = 0;
@@ -61,7 +61,7 @@
// destruction, and so speculatively call the thread wrapper.
// CHECK-LABEL: define {{.*}} @_Z6get_e3v(
-// CHECK: call {{.*}}* @_ZTW2e3()
+// CHECK: call {{.*}}ptr @_ZTW2e3()
// CHECK-LABEL: }
extern thread_local constinit struct DestructedFwdDecl e3;
DestructedFwdDecl &get_e3() { return e3; }
@@ -79,13 +79,13 @@
extern thread_local constinit Destructed e;
// CHECK-LABEL: define{{.*}} i32 @_Z5get_ev()
-// CHECK: call {{.*}}* @_ZTW1e()
+// CHECK: call {{.*}}ptr @_ZTW1e()
// CHECK: }
int get_e() { return e.n; }
// CHECK: define {{.*}}[[E2_INIT:@__cxx_global_var_init[^(]*]](
-// LINUX: call {{.*}} @__cxa_thread_atexit({{.*}} @_ZN10DestructedD1Ev {{.*}} @e2
-// DARWIN: call {{.*}} @_tlv_atexit({{.*}} @_ZN10DestructedD1Ev {{.*}} @e2
+// LINUX: call {{.*}} @__cxa_thread_atexit({{.*}} @_ZN10DestructedD1Ev, {{.*}} @e2
+// DARWIN: call {{.*}} @_tlv_atexit({{.*}} @_ZN10DestructedD1Ev, {{.*}} @e2
thread_local constinit Destructed e2;
thread_local constinit int f = 4;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124504.425426.patch
Type: text/x-patch
Size: 2958 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220427/d4e453df/attachment.bin>
More information about the cfe-commits
mailing list