summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DIE.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DIE.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIE.cpp b/lib/CodeGen/AsmPrinter/DIE.cpp
index 673867ada1..cc0cb56e8b 100644
--- a/lib/CodeGen/AsmPrinter/DIE.cpp
+++ b/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -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;