[NFC] Fix a test faliing in AIX
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Tue, 10 Jan 2023 02:36:50 +0000 (10:36 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Tue, 10 Jan 2023 02:41:21 +0000 (10:41 +0800)
See https://reviews.llvm.org/D140867.

The signature of the constructor/destrucor of the global variables is
different in different targets. And the CHECKs in the test is
unavailable in other targets (e.g., AIX). So the patch tries to avoid
the test failure by requiring the target type.

clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm

index 6080786..64d0b60 100644 (file)
@@ -1,4 +1,11 @@
 // https://github.com/llvm/llvm-project/issues/59765
+//
+// FIXME: Since the signature of the constructors/destructors is
+// different in different targets. The current CHECK can't work
+// well for other targets like AIX. So here is the REQUIRES.
+// It would be better to add the corresponding test for other test.
+// REQUIRES: x86-registered-target,aarch64-registered-target
+//
 // RUN: rm -rf %t
 // RUN: mkdir %t
 // RUN: split-file %s %t