[llvm-commits] [llvm] r42435 - /llvm/trunk/lib/CodeGen/DwarfWriter.cpp
Dan Gohman
djg at cray.com
Fri Sep 28 09:50:28 PDT 2007
Author: djg
Date: Fri Sep 28 11:50:28 2007
New Revision: 42435
URL: http://llvm.org/viewvc/llvm-project?rev=42435&view=rev
Log:
Make the checks for DW_FORM_data4 consistent with the others, and
add more such code for DIEDwarfLabel::SizeOf and DIEObjectLabel::SizeOf.
Modified:
llvm/trunk/lib/CodeGen/DwarfWriter.cpp
Modified: llvm/trunk/lib/CodeGen/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfWriter.cpp?rev=42435&r1=42434&r2=42435&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/DwarfWriter.cpp Fri Sep 28 11:50:28 2007
@@ -3481,12 +3481,14 @@
/// EmitValue - Emit label value.
///
void DIEDwarfLabel::EmitValue(DwarfDebug &DD, unsigned Form) {
- DD.EmitReference(Label, false, Form == DW_FORM_data4);
+ bool IsSmall = Form == DW_FORM_data4;
+ DD.EmitReference(Label, false, IsSmall);
}
/// SizeOf - Determine size of label value in bytes.
///
unsigned DIEDwarfLabel::SizeOf(const DwarfDebug &DD, unsigned Form) const {
+ if (Form == DW_FORM_data4) return 4;
return DD.getTargetData()->getPointerSize();
}
@@ -3495,12 +3497,14 @@
/// EmitValue - Emit label value.
///
void DIEObjectLabel::EmitValue(DwarfDebug &DD, unsigned Form) {
- DD.EmitReference(Label, false, Form == DW_FORM_data4);
+ bool IsSmall = Form == DW_FORM_data4;
+ DD.EmitReference(Label, false, IsSmall);
}
/// SizeOf - Determine size of label value in bytes.
///
unsigned DIEObjectLabel::SizeOf(const DwarfDebug &DD, unsigned Form) const {
+ if (Form == DW_FORM_data4) return 4;
return DD.getTargetData()->getPointerSize();
}
More information about the llvm-commits
mailing list