Add a name for the anonymous type we're creating for subrange

types and a FIXME for what we should be doing. Should solve the
immediacy of PR12069 where our debug info is crashing another
tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171536 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2013-01-04 21:51:53 +00:00
parent 715f6a62a1
commit 8cab6edf4f
5 changed files with 83 additions and 39 deletions

View File

@@ -1329,10 +1329,13 @@ void CompileUnit::constructArrayTypeDIE(DIE &Buffer,
DIArray Elements = CTy->getTypeArray();
// Get an anonymous type for index type.
// FIXME: This type should be passed down from the front end
// as different languages may have different sizes for indexes.
DIE *IdxTy = getIndexTyDie();
if (!IdxTy) {
// Construct an anonymous type for index type.
IdxTy = new DIE(dwarf::DW_TAG_base_type);
addString(IdxTy, dwarf::DW_AT_name, "int");
addUInt(IdxTy, dwarf::DW_AT_byte_size, 0, sizeof(int32_t));
addUInt(IdxTy, dwarf::DW_AT_encoding, dwarf::DW_FORM_data1,
dwarf::DW_ATE_signed);