[NFC][Attr] rename attribute btf_tag to btf_decl_tag

Per discussion in https://reviews.llvm.org/D111199,
the existing btf_tag attribute will be renamed to
btf_decl_tag. This patch mostly updated the Bitcode and
DebugInfo test cases with new attribute name.

Differential Revision: https://reviews.llvm.org/D111591
This commit is contained in:
Yonghong Song 2021-10-11 16:51:42 -07:00
parent b7c1ccd422
commit 325d000765
7 changed files with 35 additions and 35 deletions

View File

@ -841,7 +841,7 @@ void DwarfUnit::addAnnotation(DIE &Buffer, DINodeArray Annotations) {
const MDNode *MD = cast<MDNode>(Annotation);
const MDString *Name = cast<MDString>(MD->getOperand(0));
// Currently, only MDString is supported with btf_tag attribute.
// Currently, only MDString is supported with btf_decl_tag attribute.
const MDString *Value = cast<MDString>(MD->getOperand(1));
DIE &AnnotationDie = createAndAddDIE(dwarf::DW_TAG_LLVM_annotation, Buffer);

View File

@ -20,14 +20,14 @@
!8 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !6, file: !3, line: 1, baseType: !9, size: 32)
!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!10 = !{!11, !12}
!11 = !{!"btf_tag", !"a"}
!12 = !{!"btf_tag", !"b"}
!11 = !{!"btf_decl_tag", !"a"}
!12 = !{!"btf_decl_tag", !"b"}
; CHECK: distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t"
; CHECK-SAME: annotations: ![[ANNOT:[0-9]+]]
; CHECK: ![[ANNOT]] = !{![[TAG1:[0-9]+]], ![[TAG2:[0-9]+]]}
; CHECK: ![[TAG1]] = !{!"btf_tag", !"a"}
; CHECK: ![[TAG2]] = !{!"btf_tag", !"b"}
; CHECK: ![[TAG1]] = !{!"btf_decl_tag", !"a"}
; CHECK: ![[TAG2]] = !{!"btf_decl_tag", !"b"}
!13 = !{i32 7, !"Dwarf Version", i32 4}
!14 = !{i32 2, !"Debug Info Version", i32 3}
!15 = !{i32 1, !"wchar_size", i32 4}

View File

@ -20,14 +20,14 @@
!8 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !6, file: !3, line: 5, baseType: !9, size: 32)
!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!10 = !{!11, !12}
!11 = !{!"btf_tag", !"tag1"}
!12 = !{!"btf_tag", !"tag2"}
!11 = !{!"btf_decl_tag", !"tag1"}
!12 = !{!"btf_decl_tag", !"tag2"}
; CHECK: distinct !DIGlobalVariable(name: "g1"
; CHECK-SAME: annotations: ![[ANNOT:[0-9]+]]
; CHECK: ![[ANNOT]] = !{![[TAG1:[0-9]+]], ![[TAG2:[0-9]+]]}
; CHECK: ![[TAG1]] = !{!"btf_tag", !"tag1"}
; CHECK: ![[TAG2]] = !{!"btf_tag", !"tag2"}
; CHECK: ![[TAG1]] = !{!"btf_decl_tag", !"tag1"}
; CHECK: ![[TAG2]] = !{!"btf_decl_tag", !"tag2"}
!13 = !{i32 7, !"Dwarf Version", i32 4}
!14 = !{i32 2, !"Debug Info Version", i32 3}

View File

@ -33,14 +33,14 @@ attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
!12 = !{!13}
!13 = !DILocalVariable(name: "a", arg: 1, scope: !8, file: !1, line: 1, type: !11)
!14 = !{!15, !16}
!15 = !{!"btf_tag", !"a"}
!16 = !{!"btf_tag", !"b"}
!15 = !{!"btf_decl_tag", !"a"}
!16 = !{!"btf_decl_tag", !"b"}
; CHECK: distinct !DISubprogram(name: "f"
; CHECK-SAME: annotations: ![[ANNOT:[0-9]+]]
; CHECK: ![[ANNOT]] = !{![[TAG1:[0-9]+]], ![[TAG2:[0-9]+]]}
; CHECK: ![[TAG1]] = !{!"btf_tag", !"a"}
; CHECK: ![[TAG2]] = !{!"btf_tag", !"b"}
; CHECK: ![[TAG1]] = !{!"btf_decl_tag", !"a"}
; CHECK: ![[TAG2]] = !{!"btf_decl_tag", !"b"}
!17 = !DILocation(line: 0, scope: !8)
!18 = !DILocation(line: 1, column: 77, scope: !8)

View File

@ -59,14 +59,14 @@ attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
!15 = !{!16}
!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !1, line: 8, baseType: !12, size: 32, annotations: !17)
!17 = !{!18, !19}
!18 = !{!"btf_tag", !"tag1"}
!19 = !{!"btf_tag", !"tag2"}
!18 = !{!"btf_decl_tag", !"tag1"}
!19 = !{!"btf_decl_tag", !"tag2"}
; CHECK: !DIDerivedType(tag: DW_TAG_member, name: "a"
; CHECK-SAME: annotations: ![[ANNOT:[0-9]+]]
; CHECK: ![[ANNOT]] = !{![[TAG1:[0-9]+]], ![[TAG2:[0-9]+]]}
; CHECK: ![[TAG1]] = !{!"btf_tag", !"tag1"}
; CHECK: ![[TAG2]] = !{!"btf_tag", !"tag2"}
; CHECK: ![[TAG1]] = !{!"btf_decl_tag", !"tag1"}
; CHECK: ![[TAG2]] = !{!"btf_decl_tag", !"tag2"}
!20 = !DILocalVariable(name: "arg", arg: 1, scope: !9, file: !1, line: 11, type: !13)
!21 = !DILocation(line: 11, column: 20, scope: !9)

View File

@ -33,14 +33,14 @@ attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
!12 = !{!13}
!13 = !DILocalVariable(name: "a", arg: 1, scope: !8, file: !1, line: 1, type: !11, annotations: !14)
!14 = !{!15, !16}
!15 = !{!"btf_tag", !"a"}
!16 = !{!"btf_tag", !"b"}
!15 = !{!"btf_decl_tag", !"a"}
!16 = !{!"btf_decl_tag", !"b"}
; CHECK: !DILocalVariable(name: "a", arg: 1,
; CHECK-SAME: annotations: ![[ANNOT:[0-9]+]]
; CHECK: ![[ANNOT]] = !{![[TAG1:[0-9]+]], ![[TAG2:[0-9]+]]}
; CHECK: ![[TAG1]] = !{!"btf_tag", !"a"}
; CHECK: ![[TAG2]] = !{!"btf_tag", !"b"}
; CHECK: ![[TAG1]] = !{!"btf_decl_tag", !"a"}
; CHECK: ![[TAG2]] = !{!"btf_decl_tag", !"b"}
!17 = !DILocation(line: 0, scope: !8)
!18 = !DILocation(line: 1, column: 76, scope: !8)

View File

@ -2,8 +2,8 @@
; 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")))
; #define __tag2 __attribute__((btf_tag("tag2")))
; #define __tag1 __attribute__((btf_decl_tag("tag1")))
; #define __tag2 __attribute__((btf_decl_tag("tag2")))
;
; struct t1 {
; int a __tag1 __tag2;
@ -49,11 +49,11 @@ attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
; CHECK: DW_TAG_variable
; CHECK-NEXT: DW_AT_name ("g1")
; CHECK: DW_TAG_LLVM_annotation
; CHECK-NEXT: DW_AT_name ("btf_tag")
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
; CHECK-NEXT: DW_AT_const_value ("tag1")
; CHECK-EMPTY:
; CHECK-NEXT: DW_TAG_LLVM_annotation
; CHECK-NEXT: DW_AT_name ("btf_tag")
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
; CHECK-NEXT: DW_AT_const_value ("tag2")
; CHECK-EMPTY:
; CHECK-NEXT: NULL
@ -64,8 +64,8 @@ attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
!5 = !{!0}
!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!7 = !{!8, !9}
!8 = !{!"btf_tag", !"tag1"}
!9 = !{!"btf_tag", !"tag2"}
!8 = !{!"btf_decl_tag", !"tag1"}
!9 = !{!"btf_decl_tag", !"tag2"}
!10 = !{i32 7, !"Dwarf Version", i32 4}
!11 = !{i32 2, !"Debug Info Version", i32 3}
!12 = !{i32 1, !"wchar_size", i32 4}
@ -78,21 +78,21 @@ attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
; CHECK: DW_AT_name ("foo")
; CHECK: DW_TAG_formal_parameter
; CHECK: DW_TAG_LLVM_annotation
; CHECK-NEXT: DW_AT_name ("btf_tag")
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
; CHECK-NEXT: DW_AT_const_value ("tag1")
; CHECK-EMPTY:
; CHECK-NEXT: DW_TAG_LLVM_annotation
; CHECK-NEXT: DW_AT_name ("btf_tag")
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
; CHECK-NEXT: DW_AT_const_value ("tag2")
; CHECK-EMPTY:
; CHECK-NEXT: NULL
; CHECK-EMPTY:
; CHECK-NEXT: DW_TAG_LLVM_annotation
; CHECK-NEXT: DW_AT_name ("btf_tag")
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
; CHECK-NEXT: DW_AT_const_value ("tag1")
; CHECK-EMPTY:
; CHECK-NEXT: DW_TAG_LLVM_annotation
; CHECK-NEXT: DW_AT_name ("btf_tag")
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
; CHECK-NEXT: DW_AT_const_value ("tag2")
; CHECK-EMPTY:
; CHECK-NEXT: NULL
@ -109,21 +109,21 @@ attributes #1 = { nofree nosync nounwind readnone speculatable willreturn }
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name ("a")
; CHECK: DW_TAG_LLVM_annotation
; CHECK-NEXT: DW_AT_name ("btf_tag")
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
; CHECK-NEXT: DW_AT_const_value ("tag1")
; CHECK-EMPTY:
; CHECK-NEXT: DW_TAG_LLVM_annotation
; CHECK-NEXT: DW_AT_name ("btf_tag")
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
; CHECK-NEXT: DW_AT_const_value ("tag2")
; CHECK-EMPTY:
; CHECK-NEXT: NULL
; CHECK-EMPTY:
; CHECK-NEXT: DW_TAG_LLVM_annotation
; CHECK-NEXT: DW_AT_name ("btf_tag")
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
; CHECK-NEXT: DW_AT_const_value ("tag1")
; CHECK-EMPTY:
; CHECK-NEXT: DW_TAG_LLVM_annotation
; CHECK-NEXT: DW_AT_name ("btf_tag")
; CHECK-NEXT: DW_AT_name ("btf_decl_tag")
; CHECK-NEXT: DW_AT_const_value ("tag2")
; CHECK-EMPTY:
; CHECK-NEXT: NULL