DW_FORM_data1 may not provide sufficient room for vtable index, use _udata instead.
authorDevang Patel <dpatel@apple.com>
Thu, 9 Dec 2010 00:10:40 +0000 (00:10 +0000)
committerDevang Patel <dpatel@apple.com>
Thu, 9 Dec 2010 00:10:40 +0000 (00:10 +0000)
This fixes radar 8730409.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121323 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index f43055054e4c3262474b1fab295a706b5f299941..72b6fa1d5b91f72ffdc5d87d31635ed9f9abb7d3 100644 (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()));