[llvm] 325d000 - [NFC][Attr] rename attribute btf_tag to btf_decl_tag
Yonghong Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 11 21:15:34 PDT 2021
Author: Yonghong Song
Date: 2021-10-11T20:57:31-07:00
New Revision: 325d000765eaaf547e775d4018ec8c92cb65a768
URL: https://github.com/llvm/llvm-project/commit/325d000765eaaf547e775d4018ec8c92cb65a768
DIFF: https://github.com/llvm/llvm-project/commit/325d000765eaaf547e775d4018ec8c92cb65a768.diff
LOG: [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
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/test/Bitcode/attr-btf_tag-dicomposite.ll
llvm/test/Bitcode/attr-btf_tag-diglobalvariable.ll
llvm/test/Bitcode/attr-btf_tag-disubprogram.ll
llvm/test/Bitcode/attr-btf_tag-field.ll
llvm/test/Bitcode/attr-btf_tag-parameter.ll
llvm/test/DebugInfo/attr-btf_tag.ll
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index e4cc035009453..d4a7808b9d1e3 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -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);
diff --git a/llvm/test/Bitcode/attr-btf_tag-dicomposite.ll b/llvm/test/Bitcode/attr-btf_tag-dicomposite.ll
index 5ed1c6eeee0a3..e08e5e410a074 100644
--- a/llvm/test/Bitcode/attr-btf_tag-dicomposite.ll
+++ b/llvm/test/Bitcode/attr-btf_tag-dicomposite.ll
@@ -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}
diff --git a/llvm/test/Bitcode/attr-btf_tag-diglobalvariable.ll b/llvm/test/Bitcode/attr-btf_tag-diglobalvariable.ll
index 275611816c73c..fda3d9e31fcd9 100644
--- a/llvm/test/Bitcode/attr-btf_tag-diglobalvariable.ll
+++ b/llvm/test/Bitcode/attr-btf_tag-diglobalvariable.ll
@@ -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}
diff --git a/llvm/test/Bitcode/attr-btf_tag-disubprogram.ll b/llvm/test/Bitcode/attr-btf_tag-disubprogram.ll
index 40695dc714e44..9690bd53e4638 100644
--- a/llvm/test/Bitcode/attr-btf_tag-disubprogram.ll
+++ b/llvm/test/Bitcode/attr-btf_tag-disubprogram.ll
@@ -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)
diff --git a/llvm/test/Bitcode/attr-btf_tag-field.ll b/llvm/test/Bitcode/attr-btf_tag-field.ll
index d2013e030233b..f2fe7cf2cb4f0 100644
--- a/llvm/test/Bitcode/attr-btf_tag-field.ll
+++ b/llvm/test/Bitcode/attr-btf_tag-field.ll
@@ -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)
diff --git a/llvm/test/Bitcode/attr-btf_tag-parameter.ll b/llvm/test/Bitcode/attr-btf_tag-parameter.ll
index a31a19a138ec5..c45c5049f3937 100644
--- a/llvm/test/Bitcode/attr-btf_tag-parameter.ll
+++ b/llvm/test/Bitcode/attr-btf_tag-parameter.ll
@@ -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)
diff --git a/llvm/test/DebugInfo/attr-btf_tag.ll b/llvm/test/DebugInfo/attr-btf_tag.ll
index bb55b9963f48a..ecbb1e721d5a1 100644
--- a/llvm/test/DebugInfo/attr-btf_tag.ll
+++ b/llvm/test/DebugInfo/attr-btf_tag.ll
@@ -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
More information about the llvm-commits
mailing list