From 838d12207b04b7be7245fdff0ce93335bafe5b78 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Sun, 24 May 2020 20:55:08 -0700 Subject: [PATCH 1/4] [TargetLoweringObjectFileImpl] Use llvm::transform Fixes a build issue with libc++ configured with _LIBCPP_RAW_ITERATORS (ADL not effective) ``` llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1602:3: error: no matching function for call to 'transform' transform(HexString.begin(), HexString.end(), HexString.begin(), tolower); ^~~~~~~~~ ``` Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D80475 --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 5a5cde4b8c5205..38a0223688ba11 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -1746,7 +1746,7 @@ const MCExpr *TargetLoweringObjectFileCOFF::lowerRelativeReference( static std::string APIntToHexString(const APInt &AI) { unsigned Width = (AI.getBitWidth() / 8) * 2; std::string HexString = AI.toString(16, /*Signed=*/false); - transform(HexString.begin(), HexString.end(), HexString.begin(), tolower); + llvm::transform(HexString, HexString.begin(), tolower); unsigned Size = HexString.size(); assert(Width >= Size && "hex string is too large!"); HexString.insert(HexString.begin(), Width - Size, '0'); From 4b8632e174d5ba79c4858a1245b96efd3ed281fb Mon Sep 17 00:00:00 2001 From: Jacques Pienaar Date: Sun, 24 May 2020 20:42:58 -0700 Subject: [PATCH 2/4] [mlir] Expand operand adapter to take attributes * Enables using with more variadic sized operands; * Generate convenience accessors for attributes; - The accessor are named the same as their name in ODS and returns attribute type (not convenience type) and no derived attributes. This is first step to changing adapter to support verifying argument constraints before the op is even created. This does not change the name of adaptor nor does it require it except for ops with variadic operands to keep this change smaller. Considered creating separate adapter but decided against that given operands also require attributes in general (and definitely for verification of operands and attributes). Differential Revision: https://reviews.llvm.org/D80420 --- mlir/include/mlir/TableGen/OpClass.h | 5 - mlir/lib/TableGen/OpClass.cpp | 10 +- mlir/test/mlir-tblgen/op-decl.td | 30 +++++- mlir/test/mlir-tblgen/op-operand.td | 2 +- mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp | 103 ++++++++++++++------ 5 files changed, 103 insertions(+), 47 deletions(-) diff --git a/mlir/include/mlir/TableGen/OpClass.h b/mlir/include/mlir/TableGen/OpClass.h index 8788a505a4b38e..e8f73c605dfdb4 100644 --- a/mlir/include/mlir/TableGen/OpClass.h +++ b/mlir/include/mlir/TableGen/OpClass.h @@ -145,10 +145,6 @@ class OpClass : public Class { public: explicit OpClass(StringRef name, StringRef extraClassDeclaration = ""); - // Sets whether this OpClass should generate the using directive for its - // associate operand adaptor class. - void setHasOperandAdaptorClass(bool has); - // Adds an op trait. void addTrait(Twine trait); @@ -160,7 +156,6 @@ class OpClass : public Class { StringRef extraClassDeclaration; SmallVector traitsVec; StringSet<> traitsSet; - bool hasOperandAdaptor; }; } // namespace tblgen diff --git a/mlir/lib/TableGen/OpClass.cpp b/mlir/lib/TableGen/OpClass.cpp index 26519df725346b..bfdcbdc344a3d0 100644 --- a/mlir/lib/TableGen/OpClass.cpp +++ b/mlir/lib/TableGen/OpClass.cpp @@ -188,12 +188,7 @@ void tblgen::Class::writeDefTo(raw_ostream &os) const { //===----------------------------------------------------------------------===// tblgen::OpClass::OpClass(StringRef name, StringRef extraClassDeclaration) - : Class(name), extraClassDeclaration(extraClassDeclaration), - hasOperandAdaptor(true) {} - -void tblgen::OpClass::setHasOperandAdaptorClass(bool has) { - hasOperandAdaptor = has; -} + : Class(name), extraClassDeclaration(extraClassDeclaration) {} void tblgen::OpClass::addTrait(Twine trait) { auto traitStr = trait.str(); @@ -207,8 +202,7 @@ void tblgen::OpClass::writeDeclTo(raw_ostream &os) const { os << ", " << trait; os << "> {\npublic:\n"; os << " using Op::Op;\n"; - if (hasOperandAdaptor) - os << " using OperandAdaptor = " << className << "OperandAdaptor;\n"; + os << " using OperandAdaptor = " << className << "OperandAdaptor;\n"; bool hasPrivateMethod = false; for (const auto &method : methods) { diff --git a/mlir/test/mlir-tblgen/op-decl.td b/mlir/test/mlir-tblgen/op-decl.td index 0b9bac2ecb4cc4..c68d03c96b308d 100644 --- a/mlir/test/mlir-tblgen/op-decl.td +++ b/mlir/test/mlir-tblgen/op-decl.td @@ -50,12 +50,14 @@ def NS_AOp : NS_Op<"a_op", [IsolatedFromAbove, IsolatedFromAbove]> { // CHECK: class AOpOperandAdaptor { // CHECK: public: -// CHECK: AOpOperandAdaptor(ArrayRef values); +// CHECK: AOpOperandAdaptor(ArrayRef values // CHECK: ArrayRef getODSOperands(unsigned index); // CHECK: Value a(); // CHECK: ArrayRef b(); +// CHECK: IntegerAttr attr1(); +// CHECL: FloatAttr attr2(); // CHECK: private: -// CHECK: ArrayRef tblgen_operands; +// CHECK: ArrayRef odsOperands; // CHECK: }; // CHECK: class AOp : public Op::Impl, OpTrait::AtLeastNResults<1>::Impl, OpTrait::ZeroSuccessor, OpTrait::AtLeastNOperands<1>::Impl, OpTrait::IsIsolatedFromAbove @@ -90,6 +92,29 @@ def NS_AOp : NS_Op<"a_op", [IsolatedFromAbove, IsolatedFromAbove]> { // CHECK: void displayGraph(); // CHECK: }; +// Check AttrSizedOperandSegments +// --- + +def NS_AttrSizedOperandOp : NS_Op<"attr_sized_operands", + [AttrSizedOperandSegments]> { + let arguments = (ins + Variadic:$a, + Variadic:$b, + I32:$c, + Variadic:$d, + I32ElementsAttr:$operand_segment_sizes + ); +} + +// CHECK-LABEL: AttrSizedOperandOpOperandAdaptor( +// CHECK-SAME: ArrayRef values +// CHECK-SAME: DictionaryAttr attrs +// CHECK: ArrayRef a(); +// CHECK: ArrayRef b(); +// CHECK: Value c(); +// CHECK: ArrayRef d(); +// CHECK: DenseIntElementsAttr operand_segment_sizes(); + // Check op trait for different number of operands // --- @@ -150,3 +175,4 @@ def _BOp : NS_Op<"_op_with_leading_underscore_and_no_namespace", []>; // CHECK-LABEL: _BOp declarations // CHECK: class _BOp : public Op<_BOp + diff --git a/mlir/test/mlir-tblgen/op-operand.td b/mlir/test/mlir-tblgen/op-operand.td index 2ffde33c5331bc..5f0bfae9281206 100644 --- a/mlir/test/mlir-tblgen/op-operand.td +++ b/mlir/test/mlir-tblgen/op-operand.td @@ -15,7 +15,7 @@ def OpA : NS_Op<"one_normal_operand_op", []> { // CHECK-LABEL: OpA definitions // CHECK: OpAOperandAdaptor::OpAOperandAdaptor -// CHECK-NEXT: tblgen_operands = values +// CHECK-NEXT: odsOperands = values // CHECK: void OpA::build // CHECK: Value input diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp index 8709760e2c6bf0..2010262f21858b 100644 --- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp +++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp @@ -70,13 +70,19 @@ const char *sameVariadicSizeValueRangeCalcCode = R"( // (variadic or not). // // {0}: The name of the attribute specifying the segment sizes. -const char *attrSizedSegmentValueRangeCalcCode = R"( +const char *adapterSegmentSizeAttrInitCode = R"( + assert(odsAttrs && "missing segment size attribute for op"); + auto sizeAttr = odsAttrs.get("{0}").cast(); +)"; +const char *opSegmentSizeAttrInitCode = R"( auto sizeAttr = getAttrOfType("{0}"); +)"; +const char *attrSizedSegmentValueRangeCalcCode = R"( unsigned start = 0; for (unsigned i = 0; i < index; ++i) start += (*(sizeAttr.begin() + i)).getZExtValue(); unsigned size = (*(sizeAttr.begin() + index)).getZExtValue(); - return {{start, size}; + return {start, size}; )"; // The logic to build a range of either operand or result values. @@ -496,15 +502,14 @@ static void generateValueRangeStartAndEnd(Class &opClass, StringRef methodName, int numVariadic, int numNonVariadic, StringRef rangeSizeCall, bool hasAttrSegmentSize, - StringRef segmentSizeAttr, RangeT &&odsValues) { + StringRef sizeAttrInit, RangeT &&odsValues) { auto &method = opClass.newMethod("std::pair", methodName, "unsigned index"); if (numVariadic == 0) { method.body() << " return {index, 1};\n"; } else if (hasAttrSegmentSize) { - method.body() << formatv(attrSizedSegmentValueRangeCalcCode, - segmentSizeAttr); + method.body() << sizeAttrInit << attrSizedSegmentValueRangeCalcCode; } else { // Because the op can have arbitrarily interleaved variadic and non-variadic // operands, we need to embed a list in the "sink" getter method for @@ -532,6 +537,7 @@ generateValueRangeStartAndEnd(Class &opClass, StringRef methodName, // of ops, in particular for one-operand ops that may not have the // `getOperand(unsigned)` method. static void generateNamedOperandGetters(const Operator &op, Class &opClass, + StringRef sizeAttrInit, StringRef rangeType, StringRef rangeBeginCall, StringRef rangeSizeCall, @@ -563,10 +569,10 @@ static void generateNamedOperandGetters(const Operator &op, Class &opClass, // First emit a few "sink" getter methods upon which we layer all nicer named // getter methods. - generateValueRangeStartAndEnd( - opClass, "getODSOperandIndexAndLength", numVariadicOperands, - numNormalOperands, rangeSizeCall, attrSizedOperands, - "operand_segment_sizes", const_cast(op).getOperands()); + generateValueRangeStartAndEnd(opClass, "getODSOperandIndexAndLength", + numVariadicOperands, numNormalOperands, + rangeSizeCall, attrSizedOperands, sizeAttrInit, + const_cast(op).getOperands()); auto &m = opClass.newMethod(rangeType, "getODSOperands", "unsigned index"); m.body() << formatv(valueRangeReturnCode, rangeBeginCall, @@ -574,7 +580,6 @@ static void generateNamedOperandGetters(const Operator &op, Class &opClass, // Then we emit nicer named getter methods by redirecting to the "sink" getter // method. - for (int i = 0; i != numOperands; ++i) { const auto &operand = op.getOperand(i); if (operand.name.empty()) @@ -595,11 +600,11 @@ static void generateNamedOperandGetters(const Operator &op, Class &opClass, } void OpEmitter::genNamedOperandGetters() { - if (op.getTrait("OpTrait::AttrSizedOperandSegments")) - opClass.setHasOperandAdaptorClass(false); - generateNamedOperandGetters( - op, opClass, /*rangeType=*/"Operation::operand_range", + op, opClass, + /*sizeAttrInit=*/ + formatv(opSegmentSizeAttrInitCode, "operand_segment_sizes").str(), + /*rangeType=*/"Operation::operand_range", /*rangeBeginCall=*/"getOperation()->operand_begin()", /*rangeSizeCall=*/"getOperation()->getNumOperands()", /*getOperandCallPattern=*/"getOperation()->getOperand({0})"); @@ -656,7 +661,8 @@ void OpEmitter::genNamedResultGetters() { generateValueRangeStartAndEnd( opClass, "getODSResultIndexAndLength", numVariadicResults, numNormalResults, "getOperation()->getNumResults()", attrSizedResults, - "result_segment_sizes", op.getResults()); + formatv(opSegmentSizeAttrInitCode, "result_segment_sizes").str(), + op.getResults()); auto &m = opClass.newMethod("Operation::result_range", "getODSResults", "unsigned index"); m.body() << formatv(valueRangeReturnCode, "getOperation()->result_begin()", @@ -1840,15 +1846,56 @@ class OpOperandAdaptorEmitter { OpOperandAdaptorEmitter::OpOperandAdaptorEmitter(const Operator &op) : adapterClass(op.getCppClassName().str() + "OperandAdaptor") { - adapterClass.newField("ArrayRef", "tblgen_operands"); - auto &constructor = adapterClass.newConstructor("ArrayRef values"); - constructor.body() << " tblgen_operands = values;\n"; - - generateNamedOperandGetters(op, adapterClass, + adapterClass.newField("ArrayRef", "odsOperands"); + adapterClass.newField("DictionaryAttr", "odsAttrs"); + const auto *attrSizedOperands = + op.getTrait("OpTrait::AttrSizedOperandSegments"); + auto &constructor = adapterClass.newConstructor( + attrSizedOperands + ? "ArrayRef values, DictionaryAttr attrs" + : "ArrayRef values, DictionaryAttr attrs = nullptr"); + constructor.body() << " odsOperands = values;\n"; + constructor.body() << " odsAttrs = attrs;\n"; + + std::string sizeAttrInit = + formatv(adapterSegmentSizeAttrInitCode, "operand_segment_sizes"); + generateNamedOperandGetters(op, adapterClass, sizeAttrInit, /*rangeType=*/"ArrayRef", - /*rangeBeginCall=*/"tblgen_operands.begin()", - /*rangeSizeCall=*/"tblgen_operands.size()", - /*getOperandCallPattern=*/"tblgen_operands[{0}]"); + /*rangeBeginCall=*/"odsOperands.begin()", + /*rangeSizeCall=*/"odsOperands.size()", + /*getOperandCallPattern=*/"odsOperands[{0}]"); + + FmtContext fctx; + fctx.withBuilder("mlir::Builder(odsAttrs.getContext())"); + + auto emitAttr = [&](StringRef name, Attribute attr) { + auto &body = adapterClass.newMethod(attr.getStorageType(), name).body(); + body << " assert(odsAttrs && \"no attributes when constructing adapter\");" + << "\n " << attr.getStorageType() << " attr = " + << "odsAttrs.get(\"" << name << "\")."; + if (attr.hasDefaultValue() || attr.isOptional()) + body << "dyn_cast_or_null<"; + else + body << "cast<"; + body << attr.getStorageType() << ">();\n"; + + if (attr.hasDefaultValue()) { + // Use the default value if attribute is not set. + // TODO: this is inefficient, we are recreating the attribute for every + // call. This should be set instead. + std::string defaultValue = std::string( + tgfmt(attr.getConstBuilderTemplate(), &fctx, attr.getDefaultValue())); + body << " if (!attr)\n attr = " << defaultValue << ";\n"; + } + body << " return attr;\n"; + }; + + for (auto &namedAttr : op.getAttributes()) { + const auto &name = namedAttr.name; + const auto &attr = namedAttr.attr; + if (!attr.isDerivedAttr()) + emitAttr(name, attr); + } } void OpOperandAdaptorEmitter::emitDecl(const Operator &op, raw_ostream &os) { @@ -1873,19 +1920,13 @@ static void emitOpClasses(const std::vector &defs, raw_ostream &os, } for (auto *def : defs) { Operator op(*def); - const auto *attrSizedOperands = - op.getTrait("OpTrait::AttrSizedOperandSegments"); if (emitDecl) { os << formatv(opCommentHeader, op.getQualCppClassName(), "declarations"); - // We cannot generate the operand adaptor class if operand getters depend - // on an attribute. - if (!attrSizedOperands) - OpOperandAdaptorEmitter::emitDecl(op, os); + OpOperandAdaptorEmitter::emitDecl(op, os); OpEmitter::emitDecl(op, os); } else { os << formatv(opCommentHeader, op.getQualCppClassName(), "definitions"); - if (!attrSizedOperands) - OpOperandAdaptorEmitter::emitDef(op, os); + OpOperandAdaptorEmitter::emitDef(op, os); OpEmitter::emitDef(op, os); } } From 20e9fc55feb58dd1f766a494c530684011291ff3 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 24 May 2020 22:19:22 -0700 Subject: [PATCH 3/4] [MCDwarf] Delete unneeded DW_AT_prototyped for DW_TAG_label --- llvm/lib/MC/MCDwarf.cpp | 4 ---- llvm/test/MC/MachO/gen-dwarf.s | 4 ---- 2 files changed, 8 deletions(-) diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index 0b7fc455401891..71b8f0e28e1cd7 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -846,7 +846,6 @@ static void EmitGenDwarfAbbrev(MCStreamer *MCOS) { EmitAbbrev(MCOS, dwarf::DW_AT_decl_file, dwarf::DW_FORM_data4); EmitAbbrev(MCOS, dwarf::DW_AT_decl_line, dwarf::DW_FORM_data4); EmitAbbrev(MCOS, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr); - EmitAbbrev(MCOS, dwarf::DW_AT_prototyped, dwarf::DW_FORM_flag); EmitAbbrev(MCOS, 0, 0); // DW_TAG_unspecified_parameters DIE abbrev (3). @@ -1087,9 +1086,6 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS, MCSymbolRefExpr::VK_None, context); MCOS->emitValue(AT_low_pc, AddrSize); - // DW_AT_prototyped, a one byte flag value of 0 saying we have no prototype. - MCOS->emitInt8(0); - // The DW_TAG_unspecified_parameters DIE abbrev (3). MCOS->emitULEB128IntValue(3); diff --git a/llvm/test/MC/MachO/gen-dwarf.s b/llvm/test/MC/MachO/gen-dwarf.s index 6d39d278e8184d..58f8a7ccf89941 100644 --- a/llvm/test/MC/MachO/gen-dwarf.s +++ b/llvm/test/MC/MachO/gen-dwarf.s @@ -30,7 +30,6 @@ _x: .long 1 // CHECK: DW_AT_decl_file DW_FORM_data4 // CHECK: DW_AT_decl_line DW_FORM_data4 // CHECK: DW_AT_low_pc DW_FORM_addr -// CHECK: DW_AT_prototyped DW_FORM_flag // CHECK: [3] DW_TAG_unspecified_parameters DW_CHILDREN_no @@ -53,7 +52,6 @@ _x: .long 1 // CHECK: DW_AT_decl_file ([[FILE:".*gen-dwarf.s"]]) // CHECK: DW_AT_decl_line (5) // CHECK: DW_AT_low_pc (0x0000000000000000) -// CHECK: DW_AT_prototyped (0x00) // CHECK: DW_TAG_unspecified_parameters @@ -64,7 +62,6 @@ _x: .long 1 // CHECK: DW_AT_decl_file ([[FILE]]) // CHECK: DW_AT_decl_line (9) // CHECK: DW_AT_low_pc (0x0000000000000007) -// CHECK: DW_AT_prototyped (0x00) // CHECK: DW_TAG_unspecified_parameters @@ -75,7 +72,6 @@ _x: .long 1 // CHECK: DW_AT_decl_file ([[FILE]]) // CHECK: DW_AT_decl_line (10) // CHECK: DW_AT_low_pc (0x0000000000000007) -// CHECK: DW_AT_prototyped (0x00) // CHECK: DW_TAG_unspecified_parameters From 1b79509f97b6c9595027b53d3d67f174d0ae1c78 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 24 May 2020 22:30:59 -0700 Subject: [PATCH 4/4] [MCDwarf] Delete unneeded DW_AT_unspecified_parameters --- llvm/lib/MC/MCDwarf.cpp | 14 +------------- llvm/test/MC/ARM/dwarf-asm-multiple-sections.s | 4 ++-- llvm/test/MC/MachO/gen-dwarf.s | 16 +--------------- 3 files changed, 4 insertions(+), 30 deletions(-) diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index 71b8f0e28e1cd7..d75b55c6f8d268 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -841,19 +841,13 @@ static void EmitGenDwarfAbbrev(MCStreamer *MCOS) { // DW_TAG_label DIE abbrev (2). MCOS->emitULEB128IntValue(2); MCOS->emitULEB128IntValue(dwarf::DW_TAG_label); - MCOS->emitInt8(dwarf::DW_CHILDREN_yes); + MCOS->emitInt8(dwarf::DW_CHILDREN_no); EmitAbbrev(MCOS, dwarf::DW_AT_name, dwarf::DW_FORM_string); EmitAbbrev(MCOS, dwarf::DW_AT_decl_file, dwarf::DW_FORM_data4); EmitAbbrev(MCOS, dwarf::DW_AT_decl_line, dwarf::DW_FORM_data4); EmitAbbrev(MCOS, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr); EmitAbbrev(MCOS, 0, 0); - // DW_TAG_unspecified_parameters DIE abbrev (3). - MCOS->emitULEB128IntValue(3); - MCOS->emitULEB128IntValue(dwarf::DW_TAG_unspecified_parameters); - MCOS->emitInt8(dwarf::DW_CHILDREN_no); - EmitAbbrev(MCOS, 0, 0); - // Terminate the abbreviations for this compilation unit. MCOS->emitInt8(0); } @@ -1085,12 +1079,6 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS, const MCExpr *AT_low_pc = MCSymbolRefExpr::create(Entry.getLabel(), MCSymbolRefExpr::VK_None, context); MCOS->emitValue(AT_low_pc, AddrSize); - - // The DW_TAG_unspecified_parameters DIE abbrev (3). - MCOS->emitULEB128IntValue(3); - - // Add the NULL DIE terminating the DW_TAG_unspecified_parameters DIE's. - MCOS->emitInt8(0); } // Add the NULL DIE terminating the Compile Unit DIE's. diff --git a/llvm/test/MC/ARM/dwarf-asm-multiple-sections.s b/llvm/test/MC/ARM/dwarf-asm-multiple-sections.s index ffcdfda3975246..2f32681b362715 100644 --- a/llvm/test/MC/ARM/dwarf-asm-multiple-sections.s +++ b/llvm/test/MC/ARM/dwarf-asm-multiple-sections.s @@ -41,10 +41,10 @@ b: // DWARF4: DW_AT_ranges [DW_FORM_sec_offset] (0x00000000 // DWARF5: DW_AT_ranges [DW_FORM_sec_offset] (0x0000000c -// DWARF: 0x{{[0-9a-f]+}}: DW_TAG_label [2] * +// DWARF: 0x{{[0-9a-f]+}}: DW_TAG_label [2] // DWARF-NEXT: DW_AT_name [DW_FORM_string] ("a") -// DWARF: 0x{{[0-9a-f]+}}: DW_TAG_label [2] * +// DWARF: 0x{{[0-9a-f]+}}: DW_TAG_label [2] // DWARF-NEXT: DW_AT_name [DW_FORM_string] ("b") diff --git a/llvm/test/MC/MachO/gen-dwarf.s b/llvm/test/MC/MachO/gen-dwarf.s index 58f8a7ccf89941..5bf6cac3428e83 100644 --- a/llvm/test/MC/MachO/gen-dwarf.s +++ b/llvm/test/MC/MachO/gen-dwarf.s @@ -25,14 +25,12 @@ _x: .long 1 // CHECK: DW_AT_producer DW_FORM_string // CHECK: DW_AT_language DW_FORM_data2 -// CHECK: [2] DW_TAG_label DW_CHILDREN_yes +// CHECK: [2] DW_TAG_label DW_CHILDREN_no // CHECK: DW_AT_name DW_FORM_string // CHECK: DW_AT_decl_file DW_FORM_data4 // CHECK: DW_AT_decl_line DW_FORM_data4 // CHECK: DW_AT_low_pc DW_FORM_addr -// CHECK: [3] DW_TAG_unspecified_parameters DW_CHILDREN_no - // CHECK: .debug_info contents: @@ -53,30 +51,18 @@ _x: .long 1 // CHECK: DW_AT_decl_line (5) // CHECK: DW_AT_low_pc (0x0000000000000000) -// CHECK: DW_TAG_unspecified_parameters - -// CHECK: NULL - // CHECK: DW_TAG_label // CHECK: DW_AT_name ("foo") // CHECK: DW_AT_decl_file ([[FILE]]) // CHECK: DW_AT_decl_line (9) // CHECK: DW_AT_low_pc (0x0000000000000007) -// CHECK: DW_TAG_unspecified_parameters - -// CHECK: NULL - // CHECK: DW_TAG_label // CHECK: DW_AT_name ("baz") // CHECK: DW_AT_decl_file ([[FILE]]) // CHECK: DW_AT_decl_line (10) // CHECK: DW_AT_low_pc (0x0000000000000007) -// CHECK: DW_TAG_unspecified_parameters - -// CHECK: NULL - // CHECK: NULL // CHECK: .debug_aranges contents: