Skip to content

Commit 634156a

Browse files
committed
Fix test failures during pulldown by adding -opaque-pointers flag
1 parent bdc5988 commit 634156a

File tree

6 files changed

+39
-39
lines changed

6 files changed

+39
-39
lines changed

clang/test/CodeGen/PR44896.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
; RUN: %clang -fdiscard-value-names -S %s -o /dev/null 2>&1 | FileCheck --check-prefix=WARNING %s
2-
; RUN: %clang -S %s -o /dev/null 2>&1 | FileCheck --check-prefix=NOWARNING %s
3-
; RUN: %clang_cc1 -S -emit-llvm %s -discard-value-names -o /dev/null
1+
; RUN: %clang -Xclang -opaque-pointers -fdiscard-value-names -S %s -o /dev/null 2>&1 | FileCheck --check-prefix=WARNING %s
2+
; RUN: %clang -Xclang -opaque-pointers -S %s -o /dev/null 2>&1 | FileCheck --check-prefix=NOWARNING %s
3+
; RUN: %clang_cc1 -opaque-pointers -S -emit-llvm %s -discard-value-names -o /dev/null
44
; PR 44896
55

66
; WARNING: ignoring -fdiscard-value-names for LLVM Bitcode

clang/test/CodeGen/thinlto_backend.ll

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
; REQUIRES: x86-registered-target
22

3-
; RUN: opt -module-summary -o %t1.o %s
4-
; RUN: opt -module-summary -o %t2.o %S/Inputs/thinlto_backend.ll
5-
; RUN: llvm-lto -thinlto -o %t %t1.o %t2.o
3+
; RUN: opt -opaque-pointers -module-summary -o %t1.o %s
4+
; RUN: opt -opaque-pointers -module-summary -o %t2.o %S/Inputs/thinlto_backend.ll
5+
; RUN: llvm-lto -opaque-pointers -thinlto -o %t %t1.o %t2.o
66

77
; Ensure clang -cc1 give expected error for incorrect input type
8-
; RUN: not %clang_cc1 -O2 -o %t1.o -x c %s -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
8+
; RUN: not %clang_cc1 -opaque-pointers -O2 -o %t1.o -x c %s -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-WARNING
99
; CHECK-WARNING: error: invalid argument '-fthinlto-index={{.*}}' only allowed with '-x ir'
1010

1111
; Ensure we get expected error for missing index file
12-
; RUN: %clang -O2 -o %t4.o -x ir %t1.o -c -fthinlto-index=bad.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-ERROR1
12+
; RUN: %clang -Xclang -opaque-pointers -O2 -o %t4.o -x ir %t1.o -c -fthinlto-index=bad.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-ERROR1
1313
; CHECK-ERROR1: Error loading index file 'bad.thinlto.bc'
1414

1515
; Ensure we ignore empty index file, and run non-ThinLTO compilation which
1616
; would not import f2
1717
; RUN: touch %t4.thinlto.bc
18-
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t4.o -x ir %t1.o -c -fthinlto-index=%t4.thinlto.bc
18+
; RUN: %clang -Xclang -opaque-pointers -target x86_64-unknown-linux-gnu -O2 -o %t4.o -x ir %t1.o -c -fthinlto-index=%t4.thinlto.bc
1919
; RUN: llvm-nm %t4.o | FileCheck --check-prefix=CHECK-OBJ-IGNORE-EMPTY %s
2020
; CHECK-OBJ-IGNORE-EMPTY: T f1
2121
; CHECK-OBJ-IGNORE-EMPTY: U f2
2222

2323
; Ensure we don't fail with index and non-ThinLTO object file, and output must
2424
; be empty file.
25-
; RUN: opt -o %t5.o %s
26-
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t4.o -x ir %t5.o -c -fthinlto-index=%t.thinlto.bc
25+
; RUN: opt -opaque-pointers -o %t5.o %s
26+
; RUN: %clang -Xclang -opaque-pointers -target x86_64-unknown-linux-gnu -O2 -o %t4.o -x ir %t5.o -c -fthinlto-index=%t.thinlto.bc
2727
; RUN: llvm-nm %t4.o 2>&1 | count 0
2828

2929
; Ensure f2 was imported. Check for all 3 flavors of -save-temps[=cwd|obj].
30-
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc -save-temps=obj
31-
; RUN: llvm-dis %t1.s.3.import.bc -o - | FileCheck --check-prefix=CHECK-IMPORT %s
30+
; RUN: %clang -Xclang -opaque-pointers -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc -save-temps=obj
31+
; RUN: llvm-dis -opaque-pointers %t1.s.3.import.bc -o - | FileCheck --check-prefix=CHECK-IMPORT %s
3232
; RUN: mkdir -p %T/dir1
3333
; RUN: cd %T/dir1
34-
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc -save-temps=cwd
34+
; RUN: %clang -Xclang -opaque-pointers -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc -save-temps=cwd
3535
; RUN: cd ../..
36-
; RUN: llvm-dis %T/dir1/*1.s.3.import.bc -o - | FileCheck --check-prefix=CHECK-IMPORT %s
36+
; RUN: llvm-dis -opaque-pointers %T/dir1/*1.s.3.import.bc -o - | FileCheck --check-prefix=CHECK-IMPORT %s
3737
; RUN: mkdir -p %T/dir2
3838
; RUN: cd %T/dir2
39-
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc -save-temps
39+
; RUN: %clang -Xclang -opaque-pointers -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc -save-temps
4040
; RUN: cd ../..
41-
; RUN: llvm-dis %T/dir2/*1.s.3.import.bc -o - | FileCheck --check-prefix=CHECK-IMPORT %s
41+
; RUN: llvm-dis -opaque-pointers %T/dir2/*1.s.3.import.bc -o - | FileCheck --check-prefix=CHECK-IMPORT %s
4242
; CHECK-IMPORT: define available_externally void @f2()
4343
; RUN: llvm-nm %t3.o | FileCheck --check-prefix=CHECK-OBJ %s
4444
; CHECK-OBJ: T f1
4545
; CHECK-OBJ-NOT: U f2
4646

4747
; Ensure we get expected error for input files without summaries
48-
; RUN: opt -o %t2.o %s
49-
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-ERROR2
48+
; RUN: opt -opaque-pointers -o %t2.o %s
49+
; RUN: %clang -Xclang -opaque-pointers -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc 2>&1 | FileCheck %s -check-prefix=CHECK-ERROR2
5050
; CHECK-ERROR2: Error loading imported file {{.*}}: Could not find module summary
5151

5252
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"

clang/test/CodeGen/thinlto_backend_local_name_conflict.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
; This module will import a() and b() which should cause the read only copy
1515
; of baz from each of those modules to be imported. Check that the both are
1616
; imported as local copies.
17-
; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t4.o -x ir %t.bc -c -fthinlto-index=%t.bc.thinlto.bc -save-temps=obj
18-
; RUN: llvm-dis %t.s.3.import.bc -o - | FileCheck --check-prefix=IMPORT %s
17+
; RUN: %clang -Xclang -opaque-pointers -target x86_64-unknown-linux-gnu -O2 -o %t4.o -x ir %t.bc -c -fthinlto-index=%t.bc.thinlto.bc -save-temps=obj
18+
; RUN: llvm-dis -opaque-pointers %t.s.3.import.bc -o - | FileCheck --check-prefix=IMPORT %s
1919
; IMPORT: @baz.llvm.{{.*}} = internal global i32 10
2020
; IMPORT: @baz.llvm.{{.*}} = internal global i32 10
2121

clang/test/CodeGenCXX/thinlto-distributed-type-metadata.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
// Ensure that a distributed backend invocation of ThinLTO lowers the type test
66
// as expected.
7-
// RUN: %clang_cc1 -flto=thin -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm-bc -o %t.o %s
8-
// RUN: llvm-dis %t.o -o - | FileCheck --check-prefix=TT %s
9-
// RUN: llvm-lto -thinlto -o %t2 %t.o
10-
// RUN: %clang -target x86_64-unknown-linux -O2 -o %t3.o -x ir %t.o -c -fthinlto-index=%t2.thinlto.bc -save-temps=obj
11-
// RUN: llvm-dis %t.s.4.opt.bc -o - | FileCheck --check-prefix=OPT %s
7+
// RUN: %clang_cc1 -opaque-pointers -flto=thin -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm-bc -o %t.o %s
8+
// RUN: llvm-dis -opaque-pointers %t.o -o - | FileCheck --check-prefix=TT %s
9+
// RUN: llvm-lto -opaque-pointers -thinlto -o %t2 %t.o
10+
// RUN: %clang -Xclang -opaque-pointers -target x86_64-unknown-linux -O2 -o %t3.o -x ir %t.o -c -fthinlto-index=%t2.thinlto.bc -save-temps=obj
11+
// RUN: llvm-dis -opaque-pointers %t.s.4.opt.bc -o - | FileCheck --check-prefix=OPT %s
1212
// llvm-nm %t3.o | FileCheck --check-prefix=NM %s
1313

1414
// The pre-link bitcode produced by clang should contain a type test assume
@@ -34,12 +34,12 @@
3434
// compilation pipeline is invoked. If not lowered then LLVM CodeGen may assert.
3535
// RUN: touch %t4.thinlto.bc
3636
// O2 new PM
37-
// RUN: %clang -target x86_64-unknown-linux -O2 -o %t4.o -x ir %t.o -c -fthinlto-index=%t4.thinlto.bc -save-temps=obj
38-
// RUN: llvm-dis %t.s.4.opt.bc -o - | FileCheck --check-prefix=OPT %s
37+
// RUN: %clang -Xclang -opaque-pointers -target x86_64-unknown-linux -O2 -o %t4.o -x ir %t.o -c -fthinlto-index=%t4.thinlto.bc -save-temps=obj
38+
// RUN: llvm-dis -opaque-pointers %t.s.4.opt.bc -o - | FileCheck --check-prefix=OPT %s
3939
// llvm-nm %t4.o | FileCheck --check-prefix=NM %s
4040
// O0 new PM
41-
// RUN: %clang -target x86_64-unknown-linux -O0 -o %t4.o -x ir %t.o -c -fthinlto-index=%t4.thinlto.bc -save-temps=obj
42-
// RUN: llvm-dis %t.s.4.opt.bc -o - | FileCheck --check-prefix=OPT %s
41+
// RUN: %clang -Xclang -opaque-pointers -target x86_64-unknown-linux -O0 -o %t4.o -x ir %t.o -c -fthinlto-index=%t4.thinlto.bc -save-temps=obj
42+
// RUN: llvm-dis -opaque-pointers %t.s.4.opt.bc -o - | FileCheck --check-prefix=OPT %s
4343
// llvm-nm %t4.o | FileCheck --check-prefix=NM %s
4444

4545
struct A {

llvm/test/LTO/Resolution/X86/comdat-mixed-lto.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
; Test of comdat handling with mixed thinlto and regular lto compilation.
22

33
; This module is compiled with ThinLTO
4-
; RUN: opt -module-summary -o %t1.o %s
4+
; RUN: opt -opaque-pointers -module-summary -o %t1.o %s
55
; Input module compiled for regular LTO
6-
; RUN: opt -o %t2.o %p/Inputs/comdat-mixed-lto.ll
6+
; RUN: opt -opaque-pointers -o %t2.o %p/Inputs/comdat-mixed-lto.ll
77

88
; The copy of C from this module is prevailing. The copy of C from the
99
; regular LTO module is not prevailing, and will be dropped to
1010
; available_externally.
11-
; RUN: llvm-lto2 run -r=%t1.o,C,pl -r=%t2.o,C,l -r=%t1.o,testglobfunc,lxp -r=%t2.o,testglobfunc,lx -o %t3 %t1.o %t2.o -save-temps
11+
; RUN: llvm-lto2 run -opaque-pointers -r=%t1.o,C,pl -r=%t2.o,C,l -r=%t1.o,testglobfunc,lxp -r=%t2.o,testglobfunc,lx -o %t3 %t1.o %t2.o -save-temps
1212

1313
; The Input module (regular LTO) is %t3.0. Check to make sure that we removed
1414
; __cxx_global_var_init and testglobfunc from comdat. Also check to ensure
1515
; that testglobfunc was dropped to available_externally. Otherwise we would
1616
; have linker multiply defined errors as it is no longer in a comdat and
1717
; would clash with the copy from this module.
18-
; RUN: llvm-dis %t3.0.0.preopt.bc -o - | FileCheck %s
18+
; RUN: llvm-dis -opaque-pointers %t3.0.0.preopt.bc -o - | FileCheck %s
1919

2020
; CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @__cxx_global_var_init, ptr @C }]
2121
; CHECK: @C = available_externally dso_local global %"class.Test::ptr" zeroinitializer, align 4
@@ -24,8 +24,8 @@
2424
; CHECK-NOT: declare
2525

2626
; Check the behavior with the prevailing testglobfunc in %t2.o.
27-
; RUN: llvm-lto2 run -r=%t1.o,C,pl -r=%t2.o,C,l -r=%t1.o,testglobfunc,lx -r=%t2.o,testglobfunc,plx -o %t4 %t1.o %t2.o -save-temps
28-
; RUN: llvm-dis %t4.0.0.preopt.bc -o - | FileCheck %s --check-prefix=CHECK2
27+
; RUN: llvm-lto2 run -opaque-pointers -r=%t1.o,C,pl -r=%t2.o,C,l -r=%t1.o,testglobfunc,lx -r=%t2.o,testglobfunc,plx -o %t4 %t1.o %t2.o -save-temps
28+
; RUN: llvm-dis -opaque-pointers %t4.0.0.preopt.bc -o - | FileCheck %s --check-prefix=CHECK2
2929

3030
; CHECK2: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @__cxx_global_var_init, ptr @C }]
3131
; CHECK2: @C = available_externally dso_local global %"class.Test::ptr" zeroinitializer, align 4

llvm/test/ThinLTO/X86/constructor-alias.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
;;
88
;; clang -c -fpic -O1 -flto=thin a.cc && cp a.o b.o && ld.lld -shared a.o b.so
99

10-
; RUN: opt -module-summary %s -o %t1.bc
10+
; RUN: opt -opaque-pointers -module-summary %s -o %t1.bc
1111
; RUN: cp %t1.bc %t2.bc
12-
; RUN: llvm-lto2 run %t1.bc %t2.bc -r=%t1.bc,_ZTV1A,pl -r=%t1.bc,_ZN1AD0Ev,pl -r=%t1.bc,_ZN1AD1Ev,pl -r=%t1.bc,_ZN1AD2Ev,pl -r=%t1.bc,D1_a,pl -r=%t1.bc,D1_a_a,pl \
12+
; RUN: llvm-lto2 run -opaque-pointers %t1.bc %t2.bc -r=%t1.bc,_ZTV1A,pl -r=%t1.bc,_ZN1AD0Ev,pl -r=%t1.bc,_ZN1AD1Ev,pl -r=%t1.bc,_ZN1AD2Ev,pl -r=%t1.bc,D1_a,pl -r=%t1.bc,D1_a_a,pl \
1313
; RUN: -r=%t2.bc,_ZTV1A,l -r=%t2.bc,_ZN1AD0Ev,l -r=%t2.bc,_ZN1AD1Ev,l -r=%t2.bc,_ZN1AD2Ev,l -r=%t2.bc,D1_a,l -r=%t2.bc,D1_a_a,l -o %t3 --save-temps
14-
; RUN: llvm-dis < %t3.2.1.promote.bc | FileCheck %s
14+
; RUN: llvm-dis -opaque-pointers < %t3.2.1.promote.bc | FileCheck %s
1515

1616
; CHECK: @_ZTV1A = available_externally dso_local unnamed_addr constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr null, ptr @_ZN1AD1Ev, ptr @_ZN1AD0Ev] }
1717
; CHECK: @D1_a = available_externally dso_local unnamed_addr alias void (ptr), ptr @_ZN1AD1Ev

0 commit comments

Comments
 (0)