[llvm] [CodeGen] Remove DIE::setForceChildren and DIE::ForceChildren (NFC) (PR #227207)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 00:22:12 PDT 2026
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/227207
The last caller of DIE::setForceChildren was removed on March 6, 2017
in commit a175512b18478848bdbe203f2d25dc417860e3c5, leaving
DIE::ForceChildren always false.
Assisted-by: Antigravity
>From 497f35fb5ca502b6d2fb9393710451f66ddeabab Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 26 Sep 2026 12:41:50 -0700
Subject: [PATCH] [CodeGen] Remove DIE::setForceChildren and DIE::ForceChildren
(NFC)
The last caller of DIE::setForceChildren was removed on March 6, 2017
in commit a175512b18478848bdbe203f2d25dc417860e3c5, leaving
DIE::ForceChildren always false.
Assisted-by: Antigravity
---
llvm/include/llvm/CodeGen/DIE.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/llvm/include/llvm/CodeGen/DIE.h b/llvm/include/llvm/CodeGen/DIE.h
index eed09c2c70327..60d9cd4702eae 100644
--- a/llvm/include/llvm/CodeGen/DIE.h
+++ b/llvm/include/llvm/CodeGen/DIE.h
@@ -843,9 +843,6 @@ class DIE : IntrusiveBackListNode, public DIEValueList {
unsigned AbbrevNumber = ~0u;
/// Dwarf tag code.
dwarf::Tag Tag = (dwarf::Tag)0;
- /// Set to true to force a DIE to emit an abbreviation that says it has
- /// children even when it doesn't. This is used for unit testing purposes.
- bool ForceChildren = false;
/// Children DIEs.
IntrusiveBackList<DIE> Children;
@@ -880,8 +877,7 @@ class DIE : IntrusiveBackListNode, public DIEValueList {
assert(Size && "Size being queried before it's been ocmputed.");
return Size;
}
- bool hasChildren() const { return ForceChildren || !Children.empty(); }
- void setForceChildren(bool B) { ForceChildren = B; }
+ bool hasChildren() const { return !Children.empty(); }
using child_iterator = IntrusiveBackList<DIE>::iterator;
using const_child_iterator = IntrusiveBackList<DIE>::const_iterator;
More information about the llvm-commits
mailing list