Use dwarf::Tag rather than unsigned for DIE::Tag to make debugging easier.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfUnit.cpp
index 2302abef31d61e1fe8d52985048f4ee3f32f6845..ccecb5be50bb90207fce0ce7739de7da1680547d 100644 (file)
@@ -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);