[llvm] 38b3d4f - [NFC][DWARF] Add triple to new TAG test file

Jinsong Ji via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 3 11:16:48 PDT 2021


Author: Jinsong Ji
Date: 2021-09-03T18:15:34Z
New Revision: 38b3d4febedb105a6e55650678ad83021d973063

URL: https://github.com/llvm/llvm-project/commit/38b3d4febedb105a6e55650678ad83021d973063
DIFF: https://github.com/llvm/llvm-project/commit/38b3d4febedb105a6e55650678ad83021d973063.diff

LOG: [NFC][DWARF] Add triple to new TAG test file

The file is requiring x86, but using llc without triple.

This will cause problem on non-x86 platforms, as the default triple will
not be x86.

eg: On PowerPC le, it will emit warnings as:

'x86-64' is not a recognized processor for this target (ignoring
processor)
'+cx8' is not a recognized feature for this target (ignoring feature)
'+fxsr' is not a recognized feature for this target (ignoring feature)
'+mmx' is not a recognized feature for this target (ignoring feature)
'+sse' is not a recognized feature for this target (ignoring feature)
..

On some other platform, it may even crash -- if some of the feature are
with same name (eg: soft-float).

Add the triple as this was the intention test target.

Added: 
    

Modified: 
    llvm/test/DebugInfo/attr-btf_tag.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/DebugInfo/attr-btf_tag.ll b/llvm/test/DebugInfo/attr-btf_tag.ll
index adf43e6b1f8d5..bb55b9963f48a 100644
--- a/llvm/test/DebugInfo/attr-btf_tag.ll
+++ b/llvm/test/DebugInfo/attr-btf_tag.ll
@@ -1,5 +1,5 @@
 ; REQUIRES: x86-registered-target
-; RUN: llc -filetype=obj -o %t %s
+; RUN: llc -filetype=obj -mtriple=x86_64-unknown-linux-gnu -o %t %s
 ; RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
 ; Source:
 ;   #define __tag1 __attribute__((btf_tag("tag1")))


        


More information about the llvm-commits mailing list