File tree Expand file tree Collapse file tree 4 files changed +12
-10
lines changed
clang/test/CodeGen/PowerPC
include/llvm/Transforms/Utils
test/Transforms/CopyrightMetadata Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 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
2022export module copymod;
Original file line number Diff line number Diff line change @@ -31,4 +31,4 @@ int main() { return 0; }
3131
3232int main () { return 0 ; }
3333
34- #endif
34+ #endif
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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}
You can’t perform that action at this time.
0 commit comments