diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -841,7 +841,7 @@ const MDNode *MD = cast(Annotation); const MDString *Name = cast(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(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 --- 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 --- 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 --- a/llvm/test/Bitcode/attr-btf_tag-disubprogram.ll +++ b/llvm/test/Bitcode/attr-btf_tag-disubprogram.ll @@ -33,14 +33,14 @@ !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 --- a/llvm/test/Bitcode/attr-btf_tag-field.ll +++ b/llvm/test/Bitcode/attr-btf_tag-field.ll @@ -59,14 +59,14 @@ !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 --- a/llvm/test/Bitcode/attr-btf_tag-parameter.ll +++ b/llvm/test/Bitcode/attr-btf_tag-parameter.ll @@ -33,14 +33,14 @@ !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 --- 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 @@ ; 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 @@ !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 @@ ; 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 @@ ; 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