[llvm] r297056 - [DWARF] NFC. A few bits of minor code cleanup.
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 6 11:25:07 PST 2017
Author: cbieneman
Date: Mon Mar 6 13:25:07 2017
New Revision: 297056
URL: http://llvm.org/viewvc/llvm-project?rev=297056&view=rev
Log:
[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.
Modified:
llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.h
Modified: llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp?rev=297056&r1=297055&r2=297056&view=diff
==============================================================================
--- llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp (original)
+++ llvm/trunk/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp Mon Mar 6 13:25:07 2017
@@ -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);
Modified: llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.cpp?rev=297056&r1=297055&r2=297056&view=diff
==============================================================================
--- llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.cpp (original)
+++ llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.cpp Mon Mar 6 13:25:07 2017
@@ -108,10 +108,6 @@ dwarfgen::DIE dwarfgen::CompileUnit::get
return dwarfgen::DIE(this, &DU.getUnitDie());
}
-void dwarfgen::DIE::setForceChildren() {
- Die->setForceChildren(true);
-}
-
//===----------------------------------------------------------------------===//
/// dwarfgen::Generator implementation.
//===----------------------------------------------------------------------===//
Modified: llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.h?rev=297056&r1=297055&r2=297056&view=diff
==============================================================================
--- llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.h (original)
+++ llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.h Mon Mar 6 13:25:07 2017
@@ -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.
More information about the llvm-commits
mailing list