summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-09-28 16:50:28 +0000
committerDan Gohman <gohman@apple.com>2007-09-28 16:50:28 +0000
commit25d506c41bb923deacf723d7cf62b21aac4c650d (patch)
tree04bb3793d304c88ac4b96a2d009b3a172bf7f3db /llvm/lib/CodeGen
parent0d23d63b9e0c7624f3d13e97f1ed091aad183b18 (diff)
downloadbcm5719-llvm-25d506c41bb923deacf723d7cf62b21aac4c650d.tar.gz
bcm5719-llvm-25d506c41bb923deacf723d7cf62b21aac4c650d.zip
Make the checks for DW_FORM_data4 consistent with the others, and
add more such code for DIEDwarfLabel::SizeOf and DIEObjectLabel::SizeOf. llvm-svn: 42435
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/DwarfWriter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp
index faebaacfd7d..e6ed8f0bffa 100644
--- a/llvm/lib/CodeGen/DwarfWriter.cpp
+++ b/llvm/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();
}
OpenPOWER on IntegriCloud