summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-05-14 21:33:10 +0000
committerEric Christopher <echristo@gmail.com>2013-05-14 21:33:10 +0000
commit8fd7ab07ca26f8de0f9562c5751f4dad84c92b1b (patch)
tree0dd2228ea409272bc26e97e121cffe2a04d4e8bb /llvm/lib/CodeGen/AsmPrinter/DIE.cpp
parent014399c0de098ab25e6906a5d2b05df92086864a (diff)
downloadbcm5719-llvm-8fd7ab07ca26f8de0f9562c5751f4dad84c92b1b.tar.gz
bcm5719-llvm-8fd7ab07ca26f8de0f9562c5751f4dad84c92b1b.zip
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. llvm-svn: 181835
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
index 673867ada1a..cc0cb56e8b3 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud