Skip to content

Commit a41b510

Browse files
author
Thomas Preud'homme
committed
[HIP-Clang, test] Fix use of undef FileCheck var
Commit 8129521 changed a line defining PREFIX in clang test CodeGenCUDA/device-stub.cu into a CHECK-NOT directive. All following lines using PREFIX are therefore using an undefined variable since the pattern defining PREFIX is not supposed to occur and CHECK-NOT are checked independently. This commit replaces all uses of PREFIX by the regex used to define it, thereby avoiding the problem. Reviewed By: yaxunl Differential Revision: https://reviews.llvm.org/D99831
1 parent c2c68a5 commit a41b510

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

clang/test/CodeGenCUDA/device-stub.cu

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,13 @@ void hostfunc(void) { kernelfunc<<<1, 1>>>(1, 1, 1); }
266266
// CUDANOGLOBALS-NOT: @{{.*}} = private constant{{.*}}
267267
// HIPNOGLOBALS-NOT: @{{.*}} = internal constant{{.*}}
268268
// NOGLOBALS-NOT: define internal void @__{{.*}}_register_globals
269-
// NOGLOBALS-NOT: define internal void @__[[PREFIX:cuda|hip]]_module_ctor
270-
// NOGLOBALS-NOT: call{{.*}}[[PREFIX]]RegisterFatBinary{{.*}}__[[PREFIX]]_fatbin_wrapper
271-
// NOGLOBALS-NOT: call void @__[[PREFIX]]_register_globals
272-
// NOGLOBALS-NOT: define internal void @__[[PREFIX]]_module_dtor
273-
// NOGLOBALS-NOT: call void @__[[PREFIX]]UnregisterFatBinary
269+
// NOGLOBALS-NOT: define internal void @__{{cuda|hip}}_module_ctor
270+
// NOGLOBALS-NOT: call{{.*}}{{cuda|hip}}RegisterFatBinary{{.*}}__{{cuda|hip}}_fatbin_wrapper
271+
// NOGLOBALS-NOT: call void @__{{cuda|hip}}_register_globals
272+
// NOGLOBALS-NOT: define internal void @__{{cuda|hip}}_module_dtor
273+
// NOGLOBALS-NOT: call void @__{{cuda|hip}}UnregisterFatBinary
274274

275275
// There should be no constructors/destructors if we have no GPU binary.
276-
// NOGPUBIN-NOT: define internal void @__[[PREFIX]]_register_globals
277-
// NOGPUBIN-NOT: define internal void @__[[PREFIX]]_module_ctor
278-
// NOGPUBIN-NOT: define internal void @__[[PREFIX]]_module_dtor
276+
// NOGPUBIN-NOT: define internal void @__{{cuda|hip}}_register_globals
277+
// NOGPUBIN-NOT: define internal void @__{{cuda|hip}}_module_ctor
278+
// NOGPUBIN-NOT: define internal void @__{{cuda|hip}}_module_dtor

0 commit comments

Comments
 (0)