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

This fixes radar 8730409.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121323 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2010-12-09 00:10:40 +00:00
parent 76331754d4
commit d639c7cab4

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()));