summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-03 06:28:20 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-03 06:28:20 +0000
commit12e00fc649cd63ec111efa9a843dbb7c73d6bfdd (patch)
tree57f6339bec08f2d8b4e717dd3819c9af94a27e66 /llvm/lib/CodeGen
parent3c0dc2a99dff0ee979362264e93b0e4f2bd4a746 (diff)
downloadbcm5719-llvm-12e00fc649cd63ec111efa9a843dbb7c73d6bfdd.tar.gz
bcm5719-llvm-12e00fc649cd63ec111efa9a843dbb7c73d6bfdd.zip
DebugInfo: Use a 64 bit type for the subrange
While we were encoding 64 bit values (data8) in the subrange itself, using a 32 bit type for the subrange was still confusing the gdb. Oh, and make it unsigned too. As the comment points out, this could be pushed into the frontend so that it would be 32 or 64 bit as appropriate, etc. llvm-svn: 205512
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 97f251086ae..82e9bb008a0 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -1766,12 +1766,12 @@ void DwarfUnit::constructArrayTypeDIE(DIE &Buffer, DICompositeType CTy) {
// as different languages may have different sizes for indexes.
DIE *IdxTy = getIndexTyDie();
if (!IdxTy) {
- // Construct an anonymous type for index type.
+ // Construct an integer type to use for indexes.
IdxTy = createAndAddDIE(dwarf::DW_TAG_base_type, *UnitDie);
- addString(IdxTy, dwarf::DW_AT_name, "int");
- addUInt(IdxTy, dwarf::DW_AT_byte_size, None, sizeof(int32_t));
+ addString(IdxTy, dwarf::DW_AT_name, "sizetype");
+ addUInt(IdxTy, dwarf::DW_AT_byte_size, None, sizeof(int64_t));
addUInt(IdxTy, dwarf::DW_AT_encoding, dwarf::DW_FORM_data1,
- dwarf::DW_ATE_signed);
+ dwarf::DW_ATE_unsigned);
setIndexTyDie(IdxTy);
}
OpenPOWER on IntegriCloud