DW_FORM_data1 may not provide sufficient room for vtable index, use _udata instead.

This fixes radar 8730409.

llvm-svn: 121323
This commit is contained in:
Devang Patel 2010-12-09 00:10:40 +00:00
parent aed2efbbb5
commit c26da9005b
1 changed files with 1 additions and 1 deletions

View File

@ -1330,7 +1330,7 @@ DIE *DwarfDebug::createSubprogramDIE(DISubprogram SP) {
addUInt(SPDie, dwarf::DW_AT_virtuality, dwarf::DW_FORM_flag, VK);
DIEBlock *Block = new (DIEValueAllocator) DIEBlock();
addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_constu);
addUInt(Block, 0, dwarf::DW_FORM_data1, SP.getVirtualIndex());
addUInt(Block, 0, dwarf::DW_FORM_udata, SP.getVirtualIndex());
addBlock(SPDie, dwarf::DW_AT_vtable_elem_location, 0, Block);
ContainingTypeMap.insert(std::make_pair(SPDie,
SP.getContainingType()));