diff options
author | Dan Gohman <djg@cray.com> | 2007-09-28 16:50:28 +0000 |
---|---|---|
committer | Dan Gohman <djg@cray.com> | 2007-09-28 16:50:28 +0000 |
commit | 597b484387db527450edcce0f704132e635f4e29 (patch) | |
tree | 02571fe8584125b225170c8c82e6f3262c173f0b | |
parent | 4fd77740ade9b50d4164b27c9b7d3bb41fa614f4 (diff) | |
download | external_llvm-597b484387db527450edcce0f704132e635f4e29.zip external_llvm-597b484387db527450edcce0f704132e635f4e29.tar.gz external_llvm-597b484387db527450edcce0f704132e635f4e29.tar.bz2 |
Make the checks for DW_FORM_data4 consistent with the others, and
add more such code for DIEDwarfLabel::SizeOf and DIEObjectLabel::SizeOf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42435 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/DwarfWriter.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index faebaac..e6ed8f0 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -3481,12 +3481,14 @@ void DIEString::EmitValue(DwarfDebug &DD, unsigned Form) { /// 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 @@ unsigned DIEDwarfLabel::SizeOf(const DwarfDebug &DD, unsigned Form) const { /// 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(); } |