Skip to content

Commit a2904ba

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 c21153e commit a2904ba

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include "clang/Basic/Builtins.h"
4141
#include "clang/Basic/CodeGenOptions.h"
4242
#include "clang/Basic/Diagnostic.h"
43-
// #include "clang/Basic/DiagnosticParse.h"
43+
#include "clang/Basic/DiagnosticFrontend.h"
4444
#include "clang/Basic/Module.h"
4545
#include "clang/Basic/PragmaKinds.h"
4646
#include "clang/Basic/SourceManager.h"

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/CodeGen/AArch64/print-pipeline-passes.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
; RUN: opt -mtriple=aarch64 -S -passes='default<O2>' -print-pipeline-passes < %s | FileCheck %s
33

44
; CHECK: loop-idiom-vectorize
5-
; O0: {{^}}copyright-metadata,function(ee-instrument<>),always-inline,coro-cond(coro-early,cgscc(coro-split),coro-cleanup,globaldce),function(annotation-remarks),verify,print{{$}}
6-
5+
; O0: {{^}}copyright-metadata,function(ee-instrument<>),always-inline,coro-cond(coro-early,cgscc(coro-split),coro-cleanup,globaldce),alloc-token,function(annotation-remarks),verify,print{{$}}
76
define void @foo() {
87
entry:
98
ret void

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)