Skip to content

Commit 19a0c93

Browse files
author
Tony Varghese
committed
Update clang/test/CodeGen/PowerPC/pragma-comment-copyright-aix-modules.cpp to be an llvm based test
1 parent de8c7e6 commit 19a0c93

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

clang/test/CodeGen/PowerPC/pragma-comment-copyright-aix-modules.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44
// RUN: %clang_cc1 -std=c++20 -triple powerpc-ibm-aix \
55
// RUN: -emit-module-interface %t/copymod.cppm -o %t/copymod.pcm
66

7-
// verify that module interface emit copyright string when compiled to assembly
8-
// RUN: %clang_cc1 -std=c++20 -triple powerpc-ibm-aix -S %t/copymod.cppm -o - \
7+
// Verify that module interface emits copyright global when compiled to IR
8+
// RUN: %clang_cc1 -std=c++20 -triple powerpc-ibm-aix -emit-llvm %t/copymod.cppm -o - \
99
// RUN: | FileCheck %s --check-prefix=CHECK-MOD
10-
// CHECK-MOD: .string "module me"
10+
// CHECK-MOD: @__loadtime_copyright_str = internal unnamed_addr constant [10 x i8] c"module me\00", section "__copyright_comment"
11+
// CHECK-MOD: @llvm.used = appending global {{.*}} @__loadtime_copyright_str
1112

1213
// Compile an importing TU that uses the prebuilt module and verify that it
13-
// does NOT re-emit the module's copyright string.
14+
// does NOT re-emit the module's copyright global.
1415
// RUN: %clang_cc1 -std=c++20 -triple powerpc-ibm-aix \
15-
// RUN: -fprebuilt-module-path=%t -S %t/importmod.cc -o - \
16-
// RUN: | FileCheck %s
17-
// CHECK-NOT: .string "module me"
16+
// RUN: -fprebuilt-module-path=%t -emit-llvm %t/importmod.cc -o - \
17+
// RUN: | FileCheck %s --check-prefix=CHECK-IMPORT
18+
// CHECK-IMPORT-NOT: @__loadtime_copyright_str
19+
// CHECK-IMPORT-NOT: c"module me\00"
1820

1921
//--- copymod.cppm
2022
export module copymod;

clang/test/CodeGen/PowerPC/pragma-comment-copyright-aix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ int main() { return 0; }
3131

3232
int main() { return 0; }
3333

34-
#endif
34+
#endif

llvm/include/llvm/Transforms/Utils/CopyrightMetadataPass.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ class CopyrightMetadataPass : public PassInfoMixin<CopyrightMetadataPass> {
2222

2323
} // namespace llvm
2424

25-
#endif // LLVM_TRANSFORMS_UTILS_COPYRIGHTMETADATAPASS_H
25+
#endif // LLVM_TRANSFORMS_UTILS_COPYRIGHTMETADATAPASS_H

llvm/test/Transforms/CopyrightMetadata/copyright-metadata.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ entry:
5656

5757
; Verify metadata content
5858
; CHECK-O0: ![[MD]] = !{ptr @__loadtime_copyright_str}
59-
; CHECK-ON: ![[MD]] = !{ptr @__loadtime_copyright_str}
59+
; CHECK-ON: ![[MD]] = !{ptr @__loadtime_copyright_str}

0 commit comments

Comments
 (0)