diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-04-12 02:24:04 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-04-12 02:24:04 +0000 |
commit | efc403b91ba921f56ce9277899ca5e797b78b178 (patch) | |
tree | 937673355f52ca771c1c9f0bed0666d1d8fc1c15 /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | |
parent | e77e215469691fc223e9dd01b40c3383db90e5ed (diff) | |
download | bcm5719-llvm-efc403b91ba921f56ce9277899ca5e797b78b178.tar.gz bcm5719-llvm-efc403b91ba921f56ce9277899ca5e797b78b178.zip |
Use dwarf::Tag rather than unsigned for DIE::Tag to make debugging easier.
Nice to be able to just print out the Tag and have the debugger print
dwarf::DW_TAG_subprogram or whatever, rather than an int.
It's a bit finicky (for example DIDescriptor::getTag still returns
unsigned) because some places still handle real dwarf tags + our fake
tags (one day we'll remove the fake tags, hopefully).
llvm-svn: 206098
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 2302abef31d..ccecb5be50b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -384,7 +384,9 @@ void DwarfUnit::addDIEEntry(DIE *Die, dwarf::Attribute Attribute, /// Create a DIE with the given Tag, add the DIE to its parent, and /// call insertDIE if MD is not null. DIE *DwarfUnit::createAndAddDIE(unsigned Tag, DIE &Parent, DIDescriptor N) { - DIE *Die = new DIE(Tag); + assert(Tag != dwarf::DW_TAG_auto_variable && + Tag != dwarf::DW_TAG_arg_variable); + DIE *Die = new DIE((dwarf::Tag)Tag); Parent.addChild(Die); if (N) insertDIE(N, Die); |