mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
Make getCompileUnit non-const and return the current DIE if it
happens to be a compile unit. Noticed on inspection and tested via calling on a newly created compile unit. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181835 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -114,8 +114,8 @@ DIE::~DIE() {
|
||||
|
||||
/// Climb up the parent chain to get the compile unit DIE to which this DIE
|
||||
/// belongs.
|
||||
DIE *DIE::getCompileUnit() const {
|
||||
DIE *p = getParent();
|
||||
DIE *DIE::getCompileUnit() {
|
||||
DIE *p = this;
|
||||
while (p) {
|
||||
if (p->getTag() == dwarf::DW_TAG_compile_unit)
|
||||
return p;
|
||||
|
||||
Reference in New Issue
Block a user