@@ -2561,69 +2561,6 @@ uint64_t DWARFLinker::DIECloner::cloneAllCompileUnits(
2561
2561
return OutputDebugInfoSize - StartOutputDebugInfoSize;
2562
2562
}
2563
2563
2564
- bool DWARFLinker::emitPaperTrailWarnings (const DWARFFile &File,
2565
- OffsetsStringPool &StringPool) {
2566
-
2567
- if (File.Warnings .empty ())
2568
- return false ;
2569
-
2570
- DIE *CUDie = DIE::get (DIEAlloc, dwarf::DW_TAG_compile_unit);
2571
- CUDie->setOffset (11 );
2572
- StringRef Producer;
2573
- StringRef WarningHeader;
2574
-
2575
- switch (DwarfLinkerClientID) {
2576
- case DwarfLinkerClient::Dsymutil:
2577
- Producer = StringPool.internString (" dsymutil" );
2578
- WarningHeader = " dsymutil_warning" ;
2579
- break ;
2580
-
2581
- default :
2582
- Producer = StringPool.internString (" dwarfopt" );
2583
- WarningHeader = " dwarfopt_warning" ;
2584
- break ;
2585
- }
2586
-
2587
- StringRef FileName = StringPool.internString (File.FileName );
2588
- CUDie->addValue (DIEAlloc, dwarf::DW_AT_producer, dwarf::DW_FORM_strp,
2589
- DIEInteger (StringPool.getStringOffset (Producer)));
2590
- DIEBlock *String = new (DIEAlloc) DIEBlock ();
2591
- DIEBlocks.push_back (String);
2592
- for (auto &C : FileName)
2593
- String->addValue (DIEAlloc, dwarf::Attribute (0 ), dwarf::DW_FORM_data1,
2594
- DIEInteger (C));
2595
- String->addValue (DIEAlloc, dwarf::Attribute (0 ), dwarf::DW_FORM_data1,
2596
- DIEInteger (0 ));
2597
-
2598
- CUDie->addValue (DIEAlloc, dwarf::DW_AT_name, dwarf::DW_FORM_string, String);
2599
- for (const auto &Warning : File.Warnings ) {
2600
- DIE &ConstDie = CUDie->addChild (DIE::get (DIEAlloc, dwarf::DW_TAG_constant));
2601
- ConstDie.addValue (DIEAlloc, dwarf::DW_AT_name, dwarf::DW_FORM_strp,
2602
- DIEInteger (StringPool.getStringOffset (WarningHeader)));
2603
- ConstDie.addValue (DIEAlloc, dwarf::DW_AT_artificial, dwarf::DW_FORM_flag,
2604
- DIEInteger (1 ));
2605
- ConstDie.addValue (DIEAlloc, dwarf::DW_AT_const_value, dwarf::DW_FORM_strp,
2606
- DIEInteger (StringPool.getStringOffset (Warning)));
2607
- }
2608
- unsigned Size = 4 /* FORM_strp */ + FileName.size () + 1 +
2609
- File.Warnings .size () * (4 + 1 + 4 ) + 1 /* End of children */ ;
2610
- DIEAbbrev Abbrev = CUDie->generateAbbrev ();
2611
- assignAbbrev (Abbrev);
2612
- CUDie->setAbbrevNumber (Abbrev.getNumber ());
2613
- Size += getULEB128Size (Abbrev.getNumber ());
2614
- // Abbreviation ordering needed for classic compatibility.
2615
- for (auto &Child : CUDie->children ()) {
2616
- Abbrev = Child.generateAbbrev ();
2617
- assignAbbrev (Abbrev);
2618
- Child.setAbbrevNumber (Abbrev.getNumber ());
2619
- Size += getULEB128Size (Abbrev.getNumber ());
2620
- }
2621
- CUDie->setSize (Size);
2622
- TheDwarfEmitter->emitPaperTrailWarningsDie (*CUDie);
2623
-
2624
- return true ;
2625
- }
2626
-
2627
2564
void DWARFLinker::copyInvariantDebugSection (DWARFContext &Dwarf) {
2628
2565
TheDwarfEmitter->emitSectionContents (Dwarf.getDWARFObj ().getLocSection ().Data ,
2629
2566
" debug_loc" );
@@ -2687,9 +2624,6 @@ Error DWARFLinker::link() {
2687
2624
outs () << " OBJECT FILE: " << OptContext.File .FileName << " \n " ;
2688
2625
}
2689
2626
2690
- if (emitPaperTrailWarnings (OptContext.File , DebugStrPool))
2691
- continue ;
2692
-
2693
2627
if (!OptContext.File .Dwarf )
2694
2628
continue ;
2695
2629
0 commit comments