[llvm] 568404e - [tests] Make 'object-emission' imply 'default_triple'

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 22 05:49:53 PDT 2022


Author: Igor Kudrin
Date: 2022-03-22T16:46:48+04:00
New Revision: 568404e897532bb5c3f081c8fdfcf02d10e1abb3

URL: https://github.com/llvm/llvm-project/commit/568404e897532bb5c3f081c8fdfcf02d10e1abb3
DIFF: https://github.com/llvm/llvm-project/commit/568404e897532bb5c3f081c8fdfcf02d10e1abb3.diff

LOG: [tests] Make 'object-emission' imply 'default_triple'

If 'config.target_triple' is empty, there is no sense to define the
'object-emission' tag.

Differential Revision: https://reviews.llvm.org/D121994

Added: 
    

Modified: 
    llvm/test/DebugInfo/cross-cu-scope.ll
    llvm/test/DebugInfo/debuglineinfo-path.ll
    llvm/test/DebugInfo/dwo.ll
    llvm/test/DebugInfo/omit-empty.ll
    llvm/test/DebugInfo/skeletoncu.ll
    llvm/test/Linker/subprogram-linkonce-weak.ll
    llvm/test/Linker/type-unique-odr-a.ll
    llvm/test/Linker/type-unique-simple-a.ll
    llvm/test/Linker/type-unique-simple2-a.ll
    llvm/test/Linker/type-unique-simple2.ll
    llvm/test/Linker/type-unique-type-array-a.ll
    llvm/test/lit.cfg.py

Removed: 
    


################################################################################
diff  --git a/llvm/test/DebugInfo/cross-cu-scope.ll b/llvm/test/DebugInfo/cross-cu-scope.ll
index 9c10e031a1044..2deaca404ac79 100644
--- a/llvm/test/DebugInfo/cross-cu-scope.ll
+++ b/llvm/test/DebugInfo/cross-cu-scope.ll
@@ -1,6 +1,6 @@
 ; RUN: %llc_dwarf %s -filetype=obj -o %t
 ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
-; REQUIRES: default_triple, object-emission
+; REQUIRES: object-emission
 
 ; Reduced test case from PR35212. Two DISubprogram belong to a 
diff erent CU but
 ; share a scope. Both are declarations and end up in the scope's CU. We want to

diff  --git a/llvm/test/DebugInfo/debuglineinfo-path.ll b/llvm/test/DebugInfo/debuglineinfo-path.ll
index 2872d0301c917..affb973bdec74 100644
--- a/llvm/test/DebugInfo/debuglineinfo-path.ll
+++ b/llvm/test/DebugInfo/debuglineinfo-path.ll
@@ -3,7 +3,7 @@
 ; On powerpc llvm-nm describes win_func as a global variable, not a function. It breaks the test.
 ; It is not essential to DWARF path handling code we're testing here.
 ; UNSUPPORTED: powerpc
-; REQUIRES: default_triple, object-emission
+; REQUIRES: object-emission
 ; RUN: %llc_dwarf -O0 -filetype=obj -o %t < %s
 ; RUN: llvm-nm --radix=o %t | grep posix_absolute_func > %t.posix_absolute_func
 ; RUN: llvm-nm --radix=o %t | grep posix_relative_func > %t.posix_relative_func
@@ -72,4 +72,3 @@ define i32 @posix_relative_func() #0 !dbg !44 {
 !47 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !411 = !DILocation(line: 44, column: 2, scope: !44)
 !412 = !DIFile(filename: "c.c", directory: "/ABSOLUTE/CU/PATH")
-

diff  --git a/llvm/test/DebugInfo/dwo.ll b/llvm/test/DebugInfo/dwo.ll
index 6f2396337a047..6bf5257d7e0a0 100644
--- a/llvm/test/DebugInfo/dwo.ll
+++ b/llvm/test/DebugInfo/dwo.ll
@@ -1,6 +1,6 @@
 ; RUN: %llc_dwarf %s -filetype=obj -o %t
 ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
-; REQUIRES: default_triple, object-emission
+; REQUIRES: object-emission
 ;
 ; CHECK: DW_TAG_compile_unit
 ; CHECK-NOT: dwo_id

diff  --git a/llvm/test/DebugInfo/omit-empty.ll b/llvm/test/DebugInfo/omit-empty.ll
index 29c85558d3c1c..d2b0e25e14fbe 100644
--- a/llvm/test/DebugInfo/omit-empty.ll
+++ b/llvm/test/DebugInfo/omit-empty.ll
@@ -1,5 +1,5 @@
 ; RUN: %llc_dwarf %s -filetype=obj -o - | llvm-objdump -h - | FileCheck %s
-; REQUIRES: default_triple, object-emission
+; REQUIRES: object-emission
 
 ; CHECK-NOT: .debug_
 

diff  --git a/llvm/test/DebugInfo/skeletoncu.ll b/llvm/test/DebugInfo/skeletoncu.ll
index c05b34d200b25..659702c585df7 100644
--- a/llvm/test/DebugInfo/skeletoncu.ll
+++ b/llvm/test/DebugInfo/skeletoncu.ll
@@ -3,7 +3,7 @@
 ; CHECK: DW_TAG_compile_unit
 ; CHECK: DW_AT_GNU_dwo_id {{.*}}abcd
 ; CHECK: DW_AT_GNU_dwo_name {{.*}}"my.dwo"
-; REQUIRES: default_triple, object-emission
+; REQUIRES: object-emission
  
 !llvm.dbg.cu = !{!0}
 !llvm.module.flags = !{!3, !4}
@@ -13,4 +13,3 @@
 !2 = !{}
 !3 = !{i32 2, !"Dwarf Version", i32 4}
 !4 = !{i32 2, !"Debug Info Version", i32 3}
-

diff  --git a/llvm/test/Linker/subprogram-linkonce-weak.ll b/llvm/test/Linker/subprogram-linkonce-weak.ll
index 4bf69d718ff6d..3b0fb5d7f603b 100644
--- a/llvm/test/Linker/subprogram-linkonce-weak.ll
+++ b/llvm/test/Linker/subprogram-linkonce-weak.ll
@@ -2,7 +2,7 @@
 ; RUN: FileCheck %s -check-prefix=LW -check-prefix=CHECK <%t1
 ; RUN: llvm-link %S/Inputs/subprogram-linkonce-weak.ll %s -S -o %t2
 ; RUN: FileCheck %s -check-prefix=WL -check-prefix=CHECK <%t2
-; REQUIRES: default_triple
+; REQUIRES: object-emission
 ;
 ; Bug 47131
 ; XFAIL: sparc
@@ -86,7 +86,6 @@ entry:
 !5 = !DISubroutineType(types: !{})
 
 ; Crasher for llc.
-; REQUIRES: object-emission
 ; RUN: %llc_dwarf -filetype=obj -O0 %t1 -o %t1.o
 ; RUN: llvm-dwarfdump %t1.o --all | FileCheck %s -check-prefix=DWLW -check-prefix=DW
 ; RUN: %llc_dwarf -filetype=obj -O0 %t2 -o %t2.o

diff  --git a/llvm/test/Linker/type-unique-odr-a.ll b/llvm/test/Linker/type-unique-odr-a.ll
index 305d887951dfc..dce2001e83662 100644
--- a/llvm/test/Linker/type-unique-odr-a.ll
+++ b/llvm/test/Linker/type-unique-odr-a.ll
@@ -1,4 +1,4 @@
-; REQUIRES: default_triple, object-emission
+; REQUIRES: object-emission
 ;
 ; RUN: llvm-link %s %p/type-unique-odr-b.ll -S -o - \
 ; RUN:   | %llc_dwarf -dwarf-linkage-names=All -filetype=obj -O0 \

diff  --git a/llvm/test/Linker/type-unique-simple-a.ll b/llvm/test/Linker/type-unique-simple-a.ll
index 99f62fc92a973..9758fec881ecf 100644
--- a/llvm/test/Linker/type-unique-simple-a.ll
+++ b/llvm/test/Linker/type-unique-simple-a.ll
@@ -1,4 +1,4 @@
-; REQUIRES: default_triple, object-emission
+; REQUIRES: object-emission
 
 ; RUN: llvm-link %s %p/type-unique-simple-b.ll -S -o %t
 ; RUN: cat %t | FileCheck %s -check-prefix=LINK

diff  --git a/llvm/test/Linker/type-unique-simple2-a.ll b/llvm/test/Linker/type-unique-simple2-a.ll
index c787e35de5c12..3ddbc3c5a6abf 100644
--- a/llvm/test/Linker/type-unique-simple2-a.ll
+++ b/llvm/test/Linker/type-unique-simple2-a.ll
@@ -1,4 +1,4 @@
-; REQUIRES: default_triple, object-emission
+; REQUIRES: object-emission
 ;
 ; RUN: llvm-link %s %p/type-unique-simple2-b.ll -S -o - | %llc_dwarf -filetype=obj -O0 | llvm-dwarfdump -v -debug-info - | FileCheck %s
 ;

diff  --git a/llvm/test/Linker/type-unique-simple2.ll b/llvm/test/Linker/type-unique-simple2.ll
index 8696ac4ca2477..521faa8279f9b 100644
--- a/llvm/test/Linker/type-unique-simple2.ll
+++ b/llvm/test/Linker/type-unique-simple2.ll
@@ -1,4 +1,4 @@
-; REQUIRES: default_triple, object-emission
+; REQUIRES: object-emission
 
 ; RUN: llvm-link %S/Inputs/type-unique-simple2-a.ll %S/Inputs/type-unique-simple2-b.ll -S -o %t
 ; RUN: cat %t | FileCheck %S/Inputs/type-unique-simple2-a.ll -check-prefix=LINK

diff  --git a/llvm/test/Linker/type-unique-type-array-a.ll b/llvm/test/Linker/type-unique-type-array-a.ll
index c09fd776d609d..323c555afc989 100644
--- a/llvm/test/Linker/type-unique-type-array-a.ll
+++ b/llvm/test/Linker/type-unique-type-array-a.ll
@@ -1,4 +1,4 @@
-; REQUIRES: default_triple, object-emission
+; REQUIRES: object-emission
 ;
 ; RUN: llvm-link %s %p/type-unique-type-array-b.ll -S -o - | %llc_dwarf -filetype=obj -O0 | llvm-dwarfdump -v -debug-info - | FileCheck %s
 ;

diff  --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index dbc3c934c94d1..eea7f8922e81e 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -294,14 +294,13 @@ def have_cxx_shared_library():
 if config.libcxx_used:
     config.available_features.add('libcxx-used')
 
-# Direct object generation
-if not 'xcore' in config.target_triple:
-    config.available_features.add('object-emission')
-
 # LLVM can be configured with an empty default triple
 # Some tests are "generic" and require a valid default triple
 if config.target_triple:
     config.available_features.add('default_triple')
+    # Direct object generation
+    if not 'xcore' in config.target_triple:
+        config.available_features.add('object-emission')
 
 import subprocess
 


        


More information about the llvm-commits mailing list