[clang] 39db16e - [test] Make ELF tests less reliant on the lexicographical order of non-local symbols
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 13 01:01:18 PST 2021
Author: Fangrui Song
Date: 2021-02-13T01:01:06-08:00
New Revision: 39db16e75bd85f9c85a9df1c92a92920006b31b3
URL: https://github.com/llvm/llvm-project/commit/39db16e75bd85f9c85a9df1c92a92920006b31b3
DIFF: https://github.com/llvm/llvm-project/commit/39db16e75bd85f9c85a9df1c92a92920006b31b3.diff
LOG: [test] Make ELF tests less reliant on the lexicographical order of non-local symbols
Added:
Modified:
clang/test/InterfaceStubs/hidden-class-inheritance.cpp
llvm/test/CodeGen/AMDGPU/code-object-v3.ll
llvm/test/CodeGen/PowerPC/pcrel-tls-general-dynamic.ll
llvm/test/CodeGen/PowerPC/pcrel-tls-initial-exec.ll
llvm/test/tools/gold/X86/v1.12/thinlto_emit_linked_objects.ll
Removed:
################################################################################
diff --git a/clang/test/InterfaceStubs/hidden-class-inheritance.cpp b/clang/test/InterfaceStubs/hidden-class-inheritance.cpp
index 2219fd5b2e8a..b0a039c46f3e 100644
--- a/clang/test/InterfaceStubs/hidden-class-inheritance.cpp
+++ b/clang/test/InterfaceStubs/hidden-class-inheritance.cpp
@@ -57,14 +57,14 @@
// CHECK-X-DAG: _ZN1C1mEv
// CHECK-X-DAG: _ZN1S1nEv
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1C1mEv
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CC2Ev
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CD0Ev
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CD2Ev
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1S1nEv
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SC2Ev
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SD0Ev
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SD2Ev
+// CHECK-X-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1C1mEv
+// CHECK-X-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1CC2Ev
+// CHECK-X-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1CD0Ev
+// CHECK-X-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1CD2Ev
+// CHECK-X-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1S1nEv
+// CHECK-X-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1SC2Ev
+// CHECK-X-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1SD0Ev
+// CHECK-X-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1SD2Ev
// CHECK-HP2-DAG: _ZN1CC2Ev
// CHECK-HP2-DAG: _ZN1CD0Ev
@@ -76,14 +76,14 @@
// CHECK-HP-NOT: _ZN1SD0Ev
// CHECK-HP-NOT: _ZN1SD2Ev
-// CHECK-HP-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1C1mEv
-// CHECK-HP-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CC2Ev
-// CHECK-HP-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CD0Ev
-// CHECK-HP-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CD2Ev
-// CHECK-HP-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1S1nEv
-// CHECK-HP-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SC2Ev
-// CHECK-HP-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SD0Ev
-// CHECK-HP-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SD2Ev
+// CHECK-HP-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1C1mEv
+// CHECK-HP-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1CC2Ev
+// CHECK-HP-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1CD0Ev
+// CHECK-HP-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1CD2Ev
+// CHECK-HP-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1S1nEv
+// CHECK-HP-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1SC2Ev
+// CHECK-HP-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1SD0Ev
+// CHECK-HP-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1SD2Ev
// CHECK-HC2-DAG: _ZN1SC2Ev
// CHECK-HC2-DAG: _ZN1SD0Ev
@@ -95,14 +95,14 @@
// CHECK-HC-NOT: _ZN1CD0Ev
// CHECK-HC-NOT: _ZN1CD2Ev
-// CHECK-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1C1mEv
-// CHECK-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CC2Ev
-// CHECK-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CD0Ev
-// CHECK-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CD2Ev
-// CHECK-HC-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1S1nEv
-// CHECK-HC-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SC2Ev
-// CHECK-HC-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SD0Ev
-// CHECK-HC-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SD2Ev
+// CHECK-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1C1mEv
+// CHECK-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1CC2Ev
+// CHECK-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1CD0Ev
+// CHECK-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1CD2Ev
+// CHECK-HC-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1S1nEv
+// CHECK-HC-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1SC2Ev
+// CHECK-HC-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1SD0Ev
+// CHECK-HC-RE-DAG: FUNC WEAK DEFAULT [[#]] _ZN1SD2Ev
// CHECK-HP-HC-NOT: _ZN1CC2Ev
// CHECK-HP-HC-NOT: _ZN1CD0Ev
@@ -113,14 +113,14 @@
// CHECK-HP-HC-NOT: _ZN1C1mEv
// CHECK-HP-HC-NOT: _ZN1S1nEv
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1C1mEv
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CC2Ev
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CD0Ev
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CD2Ev
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1S1nEv
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SC2Ev
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SD0Ev
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SD2Ev
+// CHECK-HP-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1C1mEv
+// CHECK-HP-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1CC2Ev
+// CHECK-HP-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1CD0Ev
+// CHECK-HP-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1CD2Ev
+// CHECK-HP-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1S1nEv
+// CHECK-HP-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1SC2Ev
+// CHECK-HP-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1SD0Ev
+// CHECK-HP-HC-RE-DAG: FUNC WEAK HIDDEN [[#]] _ZN1SD2Ev
// TODO: clang+llvm does not materialize complete ctors and dtors for the
// Itanium abi. Figure out why and add the check-not for these:
diff --git a/llvm/test/CodeGen/AMDGPU/code-object-v3.ll b/llvm/test/CodeGen/AMDGPU/code-object-v3.ll
index 88e8060a7127..a6083d200c7b 100644
--- a/llvm/test/CodeGen/AMDGPU/code-object-v3.ll
+++ b/llvm/test/CodeGen/AMDGPU/code-object-v3.ll
@@ -50,9 +50,9 @@
; OSABI-AMDHSA-ELF: .rodata PROGBITS {{[0-9]+}} {{[0-9]+}} {{[0-9a-f]+}} {{[0-9]+}} A {{[0-9]+}} {{[0-9]+}} 64
; OSABI-AMDHSA-ELF: Relocation section '.rela.rodata' at offset
-; OSABI-AMDHSA-ELF: 0000000000000010 0000000300000005 R_AMDGPU_REL64 0000000000000000 fadd + 10
-; OSABI-AMDHSA-ELF: 0000000000000050 0000000500000005 R_AMDGPU_REL64 0000000000000100 fsub + 10
-; OSABI-AMDHSA-ELF: 0000000000000090 0000000100000005 R_AMDGPU_REL64 0000000000000200 empty + 10
+; OSABI-AMDHSA-ELF: R_AMDGPU_REL64 0000000000000000 fadd + 10
+; OSABI-AMDHSA-ELF: R_AMDGPU_REL64 0000000000000100 fsub + 10
+; OSABI-AMDHSA-ELF: R_AMDGPU_REL64 0000000000000200 empty + 10
; OSABI-AMDHSA-ELF: Symbol table '.symtab' contains {{[0-9]+}} entries
; OSABI-AMDHSA-ELF: {{[0-9]+}}: 0000000000000000 {{[0-9]+}} FUNC GLOBAL PROTECTED {{[0-9]+}} fadd
diff --git a/llvm/test/CodeGen/PowerPC/pcrel-tls-general-dynamic.ll b/llvm/test/CodeGen/PowerPC/pcrel-tls-general-dynamic.ll
index 9fdcc6fff602..8a69a18f8fd0 100644
--- a/llvm/test/CodeGen/PowerPC/pcrel-tls-general-dynamic.ll
+++ b/llvm/test/CodeGen/PowerPC/pcrel-tls-general-dynamic.ll
@@ -46,7 +46,7 @@ define i32 @GeneralDynamicValueLoad() {
; CHECK-O-NEXT: 58: 00 00 63 80 lwz 3, 0(3)
; CHECK-SYM-LABEL: Symbol table '.symtab' contains 7 entries
- ; CHECK-SYM: 6: 0000000000000000 0 TLS GLOBAL DEFAULT UND x
+ ; CHECK-SYM: 0000000000000000 0 TLS GLOBAL DEFAULT UND x
entry:
%0 = load i32, i32* @x, align 4
ret i32 %0
diff --git a/llvm/test/CodeGen/PowerPC/pcrel-tls-initial-exec.ll b/llvm/test/CodeGen/PowerPC/pcrel-tls-initial-exec.ll
index dd7e1d1f98aa..e9dabb272bfd 100644
--- a/llvm/test/CodeGen/PowerPC/pcrel-tls-initial-exec.ll
+++ b/llvm/test/CodeGen/PowerPC/pcrel-tls-initial-exec.ll
@@ -43,7 +43,7 @@ define i32 @InitialExecValueLoad() {
; CHECK-O-NEXT: 20 00 80 4e blr
; CHECK-SYM-LABEL: Symbol table '.symtab' contains 6 entries
-; CHECK-SYM: 5: 0000000000000000 0 TLS GLOBAL DEFAULT UND x
+; CHECK-SYM: 0000000000000000 0 TLS GLOBAL DEFAULT UND x
entry:
%0 = load i32, i32* @x, align 4
ret i32 %0
diff --git a/llvm/test/tools/gold/X86/v1.12/thinlto_emit_linked_objects.ll b/llvm/test/tools/gold/X86/v1.12/thinlto_emit_linked_objects.ll
index 1d585762aa04..edeb1fb5ec79 100644
--- a/llvm/test/tools/gold/X86/v1.12/thinlto_emit_linked_objects.ll
+++ b/llvm/test/tools/gold/X86/v1.12/thinlto_emit_linked_objects.ll
@@ -35,7 +35,7 @@
; should not be set.
; RUN: llvm-bcanalyzer --dump %t1.o.thinlto.bc | FileCheck %s -check-prefixes=CHECK-BC1
; CHECK-BC1: <GLOBALVAL_SUMMARY_BLOCK
-; CHECK-BC1: <FLAGS op0=33/>
+; CHECK-BC1: <FLAGS op0=[[#]]/>
; CHECK-BC1: </GLOBALVAL_SUMMARY_BLOCK
; Nothing interesting in the corresponding object file, so
More information about the cfe-commits
mailing list