From 68ea14a4089423b38c9d1e821e6e219cea997fab Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Mon, 6 Mar 2017 19:25:07 +0000 Subject: [PATCH] [DWARF] NFC. A few bits of minor code cleanup. David Blaikie pointed out that the `setForceChildren` API is no longer needed and should be removed from the DWARF Generator APIs. Also the DWARFDebugInfoTest file had some copy pasted comments that are not relevant. I've removed them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297056 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp | 6 ------ unittests/DebugInfo/DWARF/DwarfGenerator.cpp | 4 ---- unittests/DebugInfo/DWARF/DwarfGenerator.h | 3 --- 3 files changed, 13 deletions(-) diff --git a/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp index b6111e71c1a..c13b610338f 100644 --- a/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp +++ b/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp @@ -1283,9 +1283,6 @@ TEST(DWARFDebugInfo, TestFindRecurse) { StringRef AbsDieName("abs"); // Scope to allow us to re-use the same DIE names { - // Create a compile unit DIE that has an abbreviation that says it has - // children, but doesn't have any actual attributes. This helps us test - // a DIE that has only one child: a NULL DIE. auto CUDie = CU.getUnitDIE(); auto FuncSpecDie = CUDie.addChild(DW_TAG_subprogram); auto FuncDie = CUDie.addChild(DW_TAG_subprogram); @@ -1495,9 +1492,6 @@ TEST(DWARFDebugInfo, TestFindAttrs) { StringRef DieMangled("_Z3fooi"); // Scope to allow us to re-use the same DIE names { - // Create a compile unit DIE that has an abbreviation that says it has - // children, but doesn't have any actual attributes. This helps us test - // a DIE that has only one child: a NULL DIE. auto CUDie = CU.getUnitDIE(); auto FuncSpecDie = CUDie.addChild(DW_TAG_subprogram); auto FuncDie = CUDie.addChild(DW_TAG_subprogram); diff --git a/unittests/DebugInfo/DWARF/DwarfGenerator.cpp b/unittests/DebugInfo/DWARF/DwarfGenerator.cpp index 2c14786e584..ac63bbaf0a1 100644 --- a/unittests/DebugInfo/DWARF/DwarfGenerator.cpp +++ b/unittests/DebugInfo/DWARF/DwarfGenerator.cpp @@ -108,10 +108,6 @@ dwarfgen::DIE dwarfgen::CompileUnit::getUnitDIE() { return dwarfgen::DIE(this, &DU.getUnitDie()); } -void dwarfgen::DIE::setForceChildren() { - Die->setForceChildren(true); -} - //===----------------------------------------------------------------------===// /// dwarfgen::Generator implementation. //===----------------------------------------------------------------------===// diff --git a/unittests/DebugInfo/DWARF/DwarfGenerator.h b/unittests/DebugInfo/DWARF/DwarfGenerator.h index 2978d1ca002..966725b4fa4 100644 --- a/unittests/DebugInfo/DWARF/DwarfGenerator.h +++ b/unittests/DebugInfo/DWARF/DwarfGenerator.h @@ -129,9 +129,6 @@ public: /// \returns the newly created DIE object that is now a child owned by this /// object. dwarfgen::DIE addChild(dwarf::Tag Tag); - - /// Force a DIE to say it has children even when it doesn't. - void setForceChildren(); }; /// A DWARF compile unit used to generate DWARF compile/type units. -- 2.40.0