[llvm-commits] [llvm] r82729 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Mike Stump
mrs at apple.com
Thu Sep 24 16:21:27 PDT 2009
Author: mrs
Date: Thu Sep 24 18:21:26 2009
New Revision: 82729
URL: http://llvm.org/viewvc/llvm-project?rev=82729&view=rev
Log:
Delete space after function name, before (, reflow a comment and
delete a few blank lines.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=82729&r1=82728&r2=82729&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Sep 24 18:21:26 2009
@@ -664,7 +664,6 @@
// Find the __forwarding field and the variable field in the __Block_byref
// struct.
-
DIArray Fields = blockStruct.getTypeArray();
DIDescriptor varField = DIDescriptor();
DIDescriptor forwardingField = DIDescriptor();
@@ -681,20 +680,18 @@
varField = Element;
}
- assert (!varField.isNull() && "Can't find byref variable in Block struct");
- assert (!forwardingField.isNull()
- && "Can't find forwarding field in Block struct");
+ assert(!varField.isNull() && "Can't find byref variable in Block struct");
+ assert(!forwardingField.isNull()
+ && "Can't find forwarding field in Block struct");
// Get the offsets for the forwarding field and the variable field.
-
unsigned int forwardingFieldOffset =
DIDerivedType(forwardingField.getNode()).getOffsetInBits() >> 3;
unsigned int varFieldOffset =
DIDerivedType(varField.getNode()).getOffsetInBits() >> 3;
- // Decode the original location, and use that as the start of the
- // byref variable's location.
-
+ // Decode the original location, and use that as the start of the byref
+ // variable's location.
unsigned Reg = RI->getDwarfRegNum(Location.getReg(), false);
DIEBlock *Block = new DIEBlock();
@@ -717,16 +714,14 @@
AddUInt(Block, 0, dwarf::DW_FORM_sdata, Location.getOffset());
}
- // If we started with a pointer to the__Block_byref... struct, then
+ // If we started with a pointer to the __Block_byref... struct, then
// the first thing we need to do is dereference the pointer (DW_OP_deref).
-
if (isPointer)
AddUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_deref);
// Next add the offset for the '__forwarding' field:
// DW_OP_plus_uconst ForwardingFieldOffset. Note there's no point in
// adding the offset if it's 0.
-
if (forwardingFieldOffset > 0) {
AddUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst);
AddUInt(Block, 0, dwarf::DW_FORM_udata, forwardingFieldOffset);
@@ -734,20 +729,17 @@
// Now dereference the __forwarding field to get to the real __Block_byref
// struct: DW_OP_deref.
-
AddUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_deref);
// Now that we've got the real __Block_byref... struct, add the offset
// for the variable's field to get to the location of the actual variable:
// DW_OP_plus_uconst varFieldOffset. Again, don't add if it's 0.
-
if (varFieldOffset > 0) {
AddUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst);
AddUInt(Block, 0, dwarf::DW_FORM_udata, varFieldOffset);
}
// Now attach the location information to the DIE.
-
AddBlock(Die, Attribute, 0, Block);
}
More information about the llvm-commits
mailing list