summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-12 02:24:04 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-12 02:24:04 +0000
commitefc403b91ba921f56ce9277899ca5e797b78b178 (patch)
tree937673355f52ca771c1c9f0bed0666d1d8fc1c15 /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
parente77e215469691fc223e9dd01b40c3383db90e5ed (diff)
downloadbcm5719-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.cpp4
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);
OpenPOWER on IntegriCloud