mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 16:37:42 +00:00
Optimize metadata node fields for CHECK-ability
While gaining practical experience hand-updating CHECK lines (for moving the new debug info hierarchy into place), I learnt a few things about CHECK-ability of the specialized node assembly output. - The first part of a `CHECK:` is to identify the "right" node (this is especially true if you intend to use the new `CHECK-SAME` feature, since the first CHECK needs to identify the node correctly before you can split the line). - If there's a `tag:`, it should go first. - If there's a `name:`, it should go next (followed by the `linkageName:`, if any). - If there's a `scope:`, it should follow after that. - When a node type supports multiple DW_TAGs, but one is implied by its name and is overwhelmingly more common, the `tag:` field is terribly uninteresting unless it's different. - `MDBasicType` is almost always `DW_TAG_base_type`. - `MDTemplateValueParameter` is almost always `DW_TAG_template_value_parameter`. - Printing `name: ""` doesn't improve CHECK-ability, and there are far more nodes than I realized that are commonly nameless. - There are a few other fields that similarly aren't very interesting when they're empty. This commit updates the `AsmWriter` as suggested above (and makes necessary changes in `LLParser` for round-tripping). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230877 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
776b3011a7
commit
9b18dbfe83
@ -2976,6 +2976,8 @@ struct ColumnField : public MDUnsignedField {
|
||||
};
|
||||
struct DwarfTagField : public MDUnsignedField {
|
||||
DwarfTagField() : MDUnsignedField(0, dwarf::DW_TAG_hi_user) {}
|
||||
DwarfTagField(dwarf::Tag DefaultTag)
|
||||
: MDUnsignedField(DefaultTag, dwarf::DW_TAG_hi_user) {}
|
||||
};
|
||||
struct DwarfAttEncodingField : public MDUnsignedField {
|
||||
DwarfAttEncodingField() : MDUnsignedField(0, dwarf::DW_ATE_hi_user) {}
|
||||
@ -3373,7 +3375,7 @@ bool LLParser::ParseMDEnumerator(MDNode *&Result, bool IsDistinct) {
|
||||
/// ::= !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32)
|
||||
bool LLParser::ParseMDBasicType(MDNode *&Result, bool IsDistinct) {
|
||||
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
|
||||
REQUIRED(tag, DwarfTagField, ); \
|
||||
OPTIONAL(tag, DwarfTagField, (dwarf::DW_TAG_base_type)); \
|
||||
OPTIONAL(name, MDStringField, ); \
|
||||
OPTIONAL(size, MDUnsignedField, (0, UINT64_MAX)); \
|
||||
OPTIONAL(align, MDUnsignedField, (0, UINT64_MAX)); \
|
||||
@ -3604,9 +3606,9 @@ bool LLParser::ParseMDTemplateTypeParameter(MDNode *&Result, bool IsDistinct) {
|
||||
/// name: "V", type: !1, value: i32 7)
|
||||
bool LLParser::ParseMDTemplateValueParameter(MDNode *&Result, bool IsDistinct) {
|
||||
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
|
||||
REQUIRED(tag, DwarfTagField, ); \
|
||||
OPTIONAL(tag, DwarfTagField, (dwarf::DW_TAG_template_value_parameter)); \
|
||||
OPTIONAL(name, MDStringField, ); \
|
||||
REQUIRED(type, MDField, ); \
|
||||
OPTIONAL(type, MDField, ); \
|
||||
REQUIRED(value, MDField, );
|
||||
PARSE_MD_FIELDS();
|
||||
#undef VISIT_MD_FIELDS
|
||||
|
@ -1378,7 +1378,8 @@ static void writeMDBasicType(raw_ostream &Out, const MDBasicType *N,
|
||||
TypePrinting *, SlotTracker *, const Module *) {
|
||||
Out << "!MDBasicType(";
|
||||
FieldSeparator FS;
|
||||
writeTag(Out, FS, N);
|
||||
if (N->getTag() != dwarf::DW_TAG_base_type)
|
||||
writeTag(Out, FS, N);
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
if (N->getSizeInBits())
|
||||
Out << FS << "size: " << N->getSizeInBits();
|
||||
@ -1415,6 +1416,10 @@ static void writeMDDerivedType(raw_ostream &Out, const MDDerivedType *N,
|
||||
FieldSeparator FS;
|
||||
writeTag(Out, FS, N);
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
if (N->getScope()) {
|
||||
Out << FS << "scope: ";
|
||||
writeMetadataAsOperand(Out, N->getScope(), TypePrinter, Machine, Context);
|
||||
}
|
||||
if (N->getFile()) {
|
||||
Out << FS << "file: ";
|
||||
writeMetadataAsOperand(Out, N->getFile(), TypePrinter, Machine,
|
||||
@ -1422,10 +1427,6 @@ static void writeMDDerivedType(raw_ostream &Out, const MDDerivedType *N,
|
||||
}
|
||||
if (N->getLine())
|
||||
Out << FS << "line: " << N->getLine();
|
||||
if (N->getScope()) {
|
||||
Out << FS << "scope: ";
|
||||
writeMetadataAsOperand(Out, N->getScope(), TypePrinter, Machine, Context);
|
||||
}
|
||||
Out << FS << "baseType: ";
|
||||
writeMetadataAsOperand(Out, N->getBaseType(), TypePrinter, Machine, Context);
|
||||
if (N->getSizeInBits())
|
||||
@ -1453,6 +1454,10 @@ static void writeMDCompositeType(raw_ostream &Out, const MDCompositeType *N,
|
||||
FieldSeparator FS;
|
||||
writeTag(Out, FS, N);
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
if (N->getScope()) {
|
||||
Out << FS << "scope: ";
|
||||
writeMetadataAsOperand(Out, N->getScope(), TypePrinter, Machine, Context);
|
||||
}
|
||||
if (N->getFile()) {
|
||||
Out << FS << "file: ";
|
||||
writeMetadataAsOperand(Out, N->getFile(), TypePrinter, Machine,
|
||||
@ -1460,10 +1465,6 @@ static void writeMDCompositeType(raw_ostream &Out, const MDCompositeType *N,
|
||||
}
|
||||
if (N->getLine())
|
||||
Out << FS << "line: " << N->getLine();
|
||||
if (N->getScope()) {
|
||||
Out << FS << "scope: ";
|
||||
writeMetadataAsOperand(Out, N->getScope(), TypePrinter, Machine, Context);
|
||||
}
|
||||
if (N->getBaseType()) {
|
||||
Out << FS << "baseType: ";
|
||||
writeMetadataAsOperand(Out, N->getBaseType(), TypePrinter, Machine,
|
||||
@ -1582,10 +1583,10 @@ static void writeMDSubprogram(raw_ostream &Out, const MDSubprogram *N,
|
||||
const Module *Context) {
|
||||
Out << "!MDSubprogram(";
|
||||
FieldSeparator FS;
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
writeStringField(Out, FS, "linkageName", N->getLinkageName());
|
||||
Out << FS << "scope: ";
|
||||
writeMetadataAsOperand(Out, N->getScope(), TypePrinter, Machine, Context);
|
||||
writeStringField(Out, FS, "name", N->getName(), /* ShouldSkipEmpty */ false);
|
||||
writeStringField(Out, FS, "linkageName", N->getLinkageName());
|
||||
if (N->getFile()) {
|
||||
Out << FS << "file: ";
|
||||
writeMetadataAsOperand(Out, N->getFile(), TypePrinter, Machine,
|
||||
@ -1686,13 +1687,13 @@ static void writeMDNamespace(raw_ostream &Out, const MDNamespace *N,
|
||||
const Module *Context) {
|
||||
Out << "!MDNamespace(";
|
||||
FieldSeparator FS;
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
Out << FS << "scope: ";
|
||||
writeMetadataAsOperand(Out, N->getScope(), TypePrinter, Machine, Context);
|
||||
if (N->getFile()) {
|
||||
Out << FS << "file: ";
|
||||
writeMetadataAsOperand(Out, N->getFile(), TypePrinter, Machine, Context);
|
||||
}
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
if (N->getLine())
|
||||
Out << FS << "line: " << N->getLine();
|
||||
Out << ")";
|
||||
@ -1705,7 +1706,7 @@ static void writeMDTemplateTypeParameter(raw_ostream &Out,
|
||||
const Module *Context) {
|
||||
Out << "!MDTemplateTypeParameter(";
|
||||
FieldSeparator FS;
|
||||
writeStringField(Out, FS, "name", N->getName(), /* ShouldSkipEmpty */ false);
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
Out << FS << "type: ";
|
||||
writeMetadataAsOperand(Out, N->getType(), TypePrinter, Machine, Context);
|
||||
Out << ")";
|
||||
@ -1718,10 +1719,13 @@ static void writeMDTemplateValueParameter(raw_ostream &Out,
|
||||
const Module *Context) {
|
||||
Out << "!MDTemplateValueParameter(";
|
||||
FieldSeparator FS;
|
||||
writeTag(Out, FS, N);
|
||||
writeStringField(Out, FS, "name", N->getName(), /* ShouldSkipEmpty */ false);
|
||||
Out << FS << "type: ";
|
||||
writeMetadataAsOperand(Out, N->getType(), TypePrinter, Machine, Context);
|
||||
if (N->getTag() != dwarf::DW_TAG_template_value_parameter)
|
||||
writeTag(Out, FS, N);
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
if (auto *Type = N->getType()) {
|
||||
Out << FS << "type: ";
|
||||
writeMetadataAsOperand(Out, Type, TypePrinter, Machine, Context);
|
||||
}
|
||||
Out << FS << "value: ";
|
||||
writeMetadataAsOperand(Out, N->getValue(), TypePrinter, Machine, Context);
|
||||
Out << ")";
|
||||
@ -1732,10 +1736,10 @@ static void writeMDGlobalVariable(raw_ostream &Out, const MDGlobalVariable *N,
|
||||
SlotTracker *Machine, const Module *Context) {
|
||||
Out << "!MDGlobalVariable(";
|
||||
FieldSeparator FS;
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
writeStringField(Out, FS, "linkageName", N->getLinkageName());
|
||||
Out << FS << "scope: ";
|
||||
writeMetadataAsOperand(Out, N->getScope(), TypePrinter, Machine, Context);
|
||||
writeStringField(Out, FS, "name", N->getName(), /* ShouldSkipEmpty */ false);
|
||||
writeStringField(Out, FS, "linkageName", N->getLinkageName());
|
||||
if (N->getFile()) {
|
||||
Out << FS << "file: ";
|
||||
writeMetadataAsOperand(Out, N->getFile(), TypePrinter, Machine,
|
||||
@ -1769,9 +1773,11 @@ static void writeMDLocalVariable(raw_ostream &Out, const MDLocalVariable *N,
|
||||
Out << "!MDLocalVariable(";
|
||||
FieldSeparator FS;
|
||||
writeTag(Out, FS, N);
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
if (N->getTag() == dwarf::DW_TAG_arg_variable || N->getArg())
|
||||
Out << FS << "arg: " << N->getArg();
|
||||
Out << FS << "scope: ";
|
||||
writeMetadataAsOperand(Out, N->getScope(), TypePrinter, Machine, Context);
|
||||
writeStringField(Out, FS, "name", N->getName(), /* ShouldSkipEmpty */ false);
|
||||
if (N->getFile()) {
|
||||
Out << FS << "file: ";
|
||||
writeMetadataAsOperand(Out, N->getFile(), TypePrinter, Machine,
|
||||
@ -1784,8 +1790,6 @@ static void writeMDLocalVariable(raw_ostream &Out, const MDLocalVariable *N,
|
||||
writeMetadataAsOperand(Out, N->getType(), TypePrinter, Machine,
|
||||
Context);
|
||||
}
|
||||
if (N->getTag() == dwarf::DW_TAG_arg_variable || N->getArg())
|
||||
Out << FS << "arg: " << N->getArg();
|
||||
if (auto Flags = N->getFlags()) {
|
||||
Out << FS << "flags: ";
|
||||
writeDIFlags(Out, Flags);
|
||||
@ -1824,7 +1828,7 @@ static void writeMDObjCProperty(raw_ostream &Out, const MDObjCProperty *N,
|
||||
const Module *Context) {
|
||||
Out << "!MDObjCProperty(";
|
||||
FieldSeparator FS;
|
||||
writeStringField(Out, FS, "name", N->getName(), /* ShouldSkipEmpty */ false);
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
if (N->getFile()) {
|
||||
Out << FS << "file: ";
|
||||
writeMetadataAsOperand(Out, N->getFile(), TypePrinter, Machine, Context);
|
||||
@ -1848,6 +1852,7 @@ static void writeMDImportedEntity(raw_ostream &Out, const MDImportedEntity *N,
|
||||
Out << "!MDImportedEntity(";
|
||||
FieldSeparator FS;
|
||||
writeTag(Out, FS, N);
|
||||
writeStringField(Out, FS, "name", N->getName());
|
||||
Out << FS << "scope: ";
|
||||
writeMetadataAsOperand(Out, N->getScope(), TypePrinter, Machine, Context);
|
||||
if (N->getEntity()) {
|
||||
@ -1856,7 +1861,6 @@ static void writeMDImportedEntity(raw_ostream &Out, const MDImportedEntity *N,
|
||||
}
|
||||
if (N->getLine())
|
||||
Out << FS << "line: " << N->getLine();
|
||||
writeStringField(Out, FS, "name", N->getName(), /* ShouldSkipEmpty */ false);
|
||||
Out << ")";
|
||||
}
|
||||
|
||||
|
@ -20,12 +20,12 @@
|
||||
!5 = !MDEnumerator(name: "negeight", value: -8)
|
||||
!6 = !MDEnumerator(name: "", value: 0)
|
||||
|
||||
; CHECK-NEXT: !6 = !MDBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
|
||||
; CHECK-NEXT: !6 = !MDBasicType(name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
|
||||
; CHECK-NEXT: !7 = !MDBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
|
||||
; CHECK-NEXT: !8 = !MDBasicType(tag: DW_TAG_base_type)
|
||||
; CHECK-NEXT: !8 = !MDBasicType()
|
||||
!7 = !MDBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
|
||||
!8 = !MDBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
|
||||
!9 = !MDBasicType(tag: DW_TAG_base_type)
|
||||
!9 = !MDBasicType()
|
||||
!10 = !MDBasicType(tag: DW_TAG_base_type, name: "", size: 0, align: 0, encoding: 0)
|
||||
|
||||
; CHECK-NEXT: !9 = distinct !{}
|
||||
@ -41,22 +41,22 @@
|
||||
!15 = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32, align: 32)
|
||||
|
||||
; CHECK-NEXT: !14 = !MDCompositeType(tag: DW_TAG_structure_type, name: "MyType", file: !10, line: 2, size: 32, align: 32, identifier: "MangledMyType")
|
||||
; CHECK-NEXT: !15 = distinct !MDCompositeType(tag: DW_TAG_structure_type, name: "Base", file: !10, line: 3, scope: !14, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !16, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !15, templateParams: !18, identifier: "MangledBase")
|
||||
; CHECK-NEXT: !15 = distinct !MDCompositeType(tag: DW_TAG_structure_type, name: "Base", scope: !14, file: !10, line: 3, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !16, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !15, templateParams: !18, identifier: "MangledBase")
|
||||
; CHECK-NEXT: !16 = !{!17}
|
||||
; CHECK-NEXT: !17 = !MDDerivedType(tag: DW_TAG_member, name: "field", file: !10, line: 4, scope: !15, baseType: !6, size: 32, align: 32, offset: 32, flags: DIFlagPublic)
|
||||
; CHECK-NEXT: !17 = !MDDerivedType(tag: DW_TAG_member, name: "field", scope: !15, file: !10, line: 4, baseType: !6, size: 32, align: 32, offset: 32, flags: DIFlagPublic)
|
||||
; CHECK-NEXT: !18 = !{!6}
|
||||
; CHECK-NEXT: !19 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Derived", file: !10, line: 3, scope: !14, baseType: !15, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !20, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !15, templateParams: !18, identifier: "MangledBase")
|
||||
; CHECK-NEXT: !19 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Derived", scope: !14, file: !10, line: 3, baseType: !15, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !20, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !15, templateParams: !18, identifier: "MangledBase")
|
||||
; CHECK-NEXT: !20 = !{!21}
|
||||
; CHECK-NEXT: !21 = !MDDerivedType(tag: DW_TAG_inheritance, scope: !19, baseType: !15)
|
||||
; CHECK-NEXT: !22 = !MDDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !6, size: 32, align: 32, extraData: !15)
|
||||
; CHECK-NEXT: !23 = !MDCompositeType(tag: DW_TAG_structure_type)
|
||||
; CHECK-NEXT: !24 = !MDCompositeType(tag: DW_TAG_structure_type, runtimeLang: DW_LANG_Cobol85)
|
||||
!16 = !MDCompositeType(tag: DW_TAG_structure_type, name: "MyType", file: !12, line: 2, size: 32, align: 32, identifier: "MangledMyType")
|
||||
!17 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Base", file: !12, line: 3, scope: !16, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !18, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !17, templateParams: !20, identifier: "MangledBase")
|
||||
!17 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Base", scope: !16, file: !12, line: 3, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !18, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !17, templateParams: !20, identifier: "MangledBase")
|
||||
!18 = !{!19}
|
||||
!19 = !MDDerivedType(tag: DW_TAG_member, name: "field", file: !12, line: 4, scope: !17, baseType: !7, size: 32, align: 32, offset: 32, flags: DIFlagPublic)
|
||||
!19 = !MDDerivedType(tag: DW_TAG_member, name: "field", scope: !17, file: !12, line: 4, baseType: !7, size: 32, align: 32, offset: 32, flags: DIFlagPublic)
|
||||
!20 = !{!7}
|
||||
!21 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Derived", file: !12, line: 3, scope: !16, baseType: !17, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !22, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !17, templateParams: !20, identifier: "MangledBase")
|
||||
!21 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Derived", scope: !16, file: !12, line: 3, baseType: !17, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !22, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !17, templateParams: !20, identifier: "MangledBase")
|
||||
!22 = !{!23}
|
||||
!23 = !MDDerivedType(tag: DW_TAG_inheritance, scope: !21, baseType: !17)
|
||||
!24 = !MDDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !7, size: 32, align: 32, extraData: !17)
|
||||
|
@ -1,4 +0,0 @@
|
||||
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
|
||||
|
||||
; CHECK: [[@LINE+1]]:31: error: missing required field 'tag'
|
||||
!0 = !MDBasicType(name: "name")
|
@ -1,4 +0,0 @@
|
||||
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
|
||||
|
||||
; CHECK: [[@LINE+1]]:55: error: missing required field 'tag'
|
||||
!0 = !MDTemplateValueParameter(type: !{}, value: i32 7)
|
@ -1,5 +0,0 @@
|
||||
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
|
||||
|
||||
; CHECK: [[@LINE+2]]:44: error: missing required field 'type'
|
||||
!0 = !MDTemplateValueParameter(tag: DW_TAG_template_value_parameter,
|
||||
value: i32 7)
|
@ -12,11 +12,11 @@
|
||||
!3 = distinct !{}
|
||||
!4 = distinct !{}
|
||||
|
||||
; CHECK: !5 = !MDGlobalVariable(scope: !0, name: "foo", linkageName: "foo", file: !2, line: 7, type: !3, isLocal: true, isDefinition: false, variable: i32* @foo, declaration: !4)
|
||||
!5 = !MDGlobalVariable(scope: !0, name: "foo", linkageName: "foo",
|
||||
; CHECK: !5 = !MDGlobalVariable(name: "foo", linkageName: "foo", scope: !0, file: !2, line: 7, type: !3, isLocal: true, isDefinition: false, variable: i32* @foo, declaration: !4)
|
||||
!5 = !MDGlobalVariable(name: "foo", linkageName: "foo", scope: !0,
|
||||
file: !2, line: 7, type: !3, isLocal: true,
|
||||
isDefinition: false, variable: i32* @foo,
|
||||
declaration: !4)
|
||||
|
||||
; CHECK: !6 = !MDGlobalVariable(scope: null, name: "bar", isLocal: false, isDefinition: true)
|
||||
; CHECK: !6 = !MDGlobalVariable(name: "bar", scope: null, isLocal: false, isDefinition: true)
|
||||
!6 = !MDGlobalVariable(name: "bar")
|
||||
|
@ -9,12 +9,12 @@
|
||||
!0 = distinct !{}
|
||||
!1 = distinct !{}
|
||||
|
||||
; CHECK-NEXT: !2 = !MDImportedEntity(tag: DW_TAG_imported_module, scope: !0, entity: !1, line: 7, name: "foo")
|
||||
!2 = !MDImportedEntity(tag: DW_TAG_imported_module, scope: !0, entity: !1,
|
||||
line: 7, name: "foo")
|
||||
; CHECK-NEXT: !2 = !MDImportedEntity(tag: DW_TAG_imported_module, name: "foo", scope: !0, entity: !1, line: 7)
|
||||
!2 = !MDImportedEntity(tag: DW_TAG_imported_module, name: "foo", scope: !0,
|
||||
entity: !1, line: 7)
|
||||
|
||||
; CHECK-NEXT: !3 = !MDImportedEntity(tag: DW_TAG_imported_module, scope: !0, name: "")
|
||||
; CHECK-NEXT: !3 = !MDImportedEntity(tag: DW_TAG_imported_module, scope: !0)
|
||||
!3 = !MDImportedEntity(tag: DW_TAG_imported_module, scope: !0)
|
||||
!4 = !MDImportedEntity(tag: DW_TAG_imported_module, scope: !0, entity: null,
|
||||
line: 0, name: "")
|
||||
!4 = !MDImportedEntity(tag: DW_TAG_imported_module, name: "", scope: !0, entity: null,
|
||||
line: 0)
|
||||
|
||||
|
@ -12,15 +12,15 @@
|
||||
!3 = distinct !{}
|
||||
!4 = distinct !{}
|
||||
|
||||
; CHECK: !5 = !MDLocalVariable(tag: DW_TAG_arg_variable, scope: !0, name: "foo", file: !2, line: 7, type: !3, arg: 3, flags: DIFlagArtificial, inlinedAt: !4)
|
||||
; CHECK: !6 = !MDLocalVariable(tag: DW_TAG_auto_variable, scope: !0, name: "foo", file: !2, line: 7, type: !3, flags: DIFlagArtificial, inlinedAt: !4)
|
||||
!5 = !MDLocalVariable(tag: DW_TAG_arg_variable, scope: !0, name: "foo",
|
||||
file: !2, line: 7, type: !3, arg: 3,
|
||||
; CHECK: !5 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "foo", arg: 3, scope: !0, file: !2, line: 7, type: !3, flags: DIFlagArtificial, inlinedAt: !4)
|
||||
; CHECK: !6 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "foo", scope: !0, file: !2, line: 7, type: !3, flags: DIFlagArtificial, inlinedAt: !4)
|
||||
!5 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "foo", arg: 3,
|
||||
scope: !0, file: !2, line: 7, type: !3,
|
||||
flags: DIFlagArtificial, inlinedAt: !4)
|
||||
!6 = !MDLocalVariable(tag: DW_TAG_auto_variable, scope: !0, name: "foo",
|
||||
!6 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "foo", scope: !0,
|
||||
file: !2, line: 7, type: !3, flags: DIFlagArtificial, inlinedAt: !4)
|
||||
|
||||
; CHECK: !7 = !MDLocalVariable(tag: DW_TAG_arg_variable, scope: null, name: "", arg: 0)
|
||||
; CHECK: !8 = !MDLocalVariable(tag: DW_TAG_auto_variable, scope: null, name: "")
|
||||
; CHECK: !7 = !MDLocalVariable(tag: DW_TAG_arg_variable, arg: 0, scope: null)
|
||||
; CHECK: !8 = !MDLocalVariable(tag: DW_TAG_auto_variable, scope: null)
|
||||
!7 = !MDLocalVariable(tag: DW_TAG_arg_variable)
|
||||
!8 = !MDLocalVariable(tag: DW_TAG_auto_variable)
|
||||
|
@ -8,9 +8,9 @@
|
||||
!1 = distinct !{}
|
||||
!2 = !MDFile(filename: "path/to/file", directory: "/path/to/dir")
|
||||
|
||||
; CHECK: !3 = !MDNamespace(scope: !0, file: !2, name: "Namespace", line: 7)
|
||||
!3 = !MDNamespace(scope: !0, file: !2, name: "Namespace", line: 7)
|
||||
; CHECK: !3 = !MDNamespace(name: "Namespace", scope: !0, file: !2, line: 7)
|
||||
!3 = !MDNamespace(name: "Namespace", scope: !0, file: !2, line: 7)
|
||||
|
||||
; CHECK: !4 = !MDNamespace(scope: !0)
|
||||
!4 = !MDNamespace(scope: !0, file: null, name: "", line: 0)
|
||||
!4 = !MDNamespace(name: "", scope: !0, file: null, line: 0)
|
||||
!5 = !MDNamespace(scope: !0)
|
||||
|
@ -15,14 +15,14 @@ declare void @_Z3foov()
|
||||
!6 = distinct !{}
|
||||
!7 = distinct !{}
|
||||
|
||||
; CHECK: !8 = !MDSubprogram(scope: !0, name: "foo", linkageName: "_Zfoov", file: !2, line: 7, type: !3, isLocal: true, isDefinition: false, scopeLine: 8, containingType: !4, virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10, flags: DIFlagPrototyped, isOptimized: true, function: void ()* @_Z3foov, templateParams: !5, declaration: !6, variables: !7)
|
||||
!8 = !MDSubprogram(scope: !0, name: "foo", linkageName: "_Zfoov",
|
||||
; CHECK: !8 = !MDSubprogram(name: "foo", linkageName: "_Zfoov", scope: !0, file: !2, line: 7, type: !3, isLocal: true, isDefinition: false, scopeLine: 8, containingType: !4, virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10, flags: DIFlagPrototyped, isOptimized: true, function: void ()* @_Z3foov, templateParams: !5, declaration: !6, variables: !7)
|
||||
!8 = !MDSubprogram(name: "foo", linkageName: "_Zfoov", scope: !0,
|
||||
file: !2, line: 7, type: !3, isLocal: true,
|
||||
isDefinition: false, scopeLine: 8, containingType: !4,
|
||||
virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10,
|
||||
flags: DIFlagPrototyped, isOptimized: true, function: void ()* @_Z3foov,
|
||||
templateParams: !5, declaration: !6, variables: !7)
|
||||
|
||||
; CHECK: !9 = !MDSubprogram(scope: null, name: "bar", isLocal: false, isDefinition: true, isOptimized: false)
|
||||
; CHECK: !9 = !MDSubprogram(name: "bar", scope: null, isLocal: false, isDefinition: true, isOptimized: false)
|
||||
!9 = !MDSubprogram(name: "bar")
|
||||
|
||||
|
@ -1,24 +1,24 @@
|
||||
; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
|
||||
; RUN: verify-uselistorder %s
|
||||
|
||||
; CHECK: !named = !{!0, !1, !2, !3, !3, !4, !5, !5}
|
||||
!named = !{!0, !1, !2, !3, !4, !5, !6, !7}
|
||||
; CHECK: !named = !{!0, !1, !2, !3, !3, !4, !5, !5, !6}
|
||||
!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
|
||||
!0 = distinct !{}
|
||||
!1 = distinct !{}
|
||||
; CHECK: !1 = distinct !{}
|
||||
|
||||
; CHECK-NEXT: !2 = !MDTemplateTypeParameter(name: "Ty", type: !1)
|
||||
; CHECK-NEXT: !3 = !MDTemplateTypeParameter(name: "", type: !1)
|
||||
; CHECK-NEXT: !3 = !MDTemplateTypeParameter(type: !1)
|
||||
!2 = !MDTemplateTypeParameter(name: "Ty", type: !1)
|
||||
!3 = !MDTemplateTypeParameter(type: !1)
|
||||
!4 = !MDTemplateTypeParameter(name: "", type: !1)
|
||||
|
||||
; CHECK-NEXT: !4 = !MDTemplateValueParameter(tag: DW_TAG_template_value_parameter, name: "V", type: !1, value: i32 7)
|
||||
; CHECK-NEXT: !5 = !MDTemplateValueParameter(tag: DW_TAG_template_value_parameter, name: "", type: !1, value: i32 7)
|
||||
!5 = !MDTemplateValueParameter(tag: DW_TAG_template_value_parameter,
|
||||
name: "V", type: !1, value: i32 7)
|
||||
!6 = !MDTemplateValueParameter(tag: DW_TAG_template_value_parameter,
|
||||
type: !1, value: i32 7)
|
||||
; CHECK-NEXT: !4 = !MDTemplateValueParameter(name: "V", type: !1, value: i32 7)
|
||||
; CHECK-NEXT: !5 = !MDTemplateValueParameter(type: !1, value: i32 7)
|
||||
; CHECK-NEXT: !6 = !MDTemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "param", type: !1, value: !"template")
|
||||
!5 = !MDTemplateValueParameter(name: "V", type: !1, value: i32 7)
|
||||
!6 = !MDTemplateValueParameter(type: !1, value: i32 7)
|
||||
!7 = !MDTemplateValueParameter(tag: DW_TAG_template_value_parameter,
|
||||
name: "", type: !1, value: i32 7)
|
||||
!8 = !MDTemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "param", type: !1, value: !"template")
|
||||
|
@ -4,7 +4,7 @@
|
||||
; CHECK: !named = !{!0, !1, !2}
|
||||
!named = !{!0, !1, !2}
|
||||
|
||||
; CHECK: !0 = !MDBasicType(tag: DW_TAG_base_type, name: "name", size: 18446744073709551615, align: 18446744073709551614, encoding: DW_ATE_unsigned_char)
|
||||
; CHECK: !0 = !MDBasicType(name: "name", size: 18446744073709551615, align: 18446744073709551614, encoding: DW_ATE_unsigned_char)
|
||||
; CHECK-NEXT: !1 = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !0, size: 18446744073709551615, align: 18446744073709551614, offset: 18446744073709551613)
|
||||
; CHECK-NEXT: !2 = !MDCompositeType(tag: DW_TAG_array_type, baseType: !0, size: 18446744073709551615, align: 18446744073709551614, offset: 18446744073709551613)
|
||||
!0 = !MDBasicType(tag: DW_TAG_base_type, name: "name", size: 18446744073709551615, align: 18446744073709551614, encoding: DW_ATE_unsigned_char)
|
||||
|
Loading…
Reference in New Issue
Block a user