summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-09-28 15:43:33 +0000
committerDan Gohman <gohman@apple.com>2007-09-28 15:43:33 +0000
commit0d23d63b9e0c7624f3d13e97f1ed091aad183b18 (patch)
treeecdb78d9bf75d69536d97470a21b5550e1aadc5f /llvm
parent6c04ac1db02f8c99516147d67a858abe0a7b815c (diff)
downloadbcm5719-llvm-0d23d63b9e0c7624f3d13e97f1ed091aad183b18.tar.gz
bcm5719-llvm-0d23d63b9e0c7624f3d13e97f1ed091aad183b18.zip
Use 32-bit data directives for DW_FORM_data4 format data, even on
targets with 64-bit addresses. llvm-svn: 42434
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/DwarfWriter.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp
index 0261a00f590..faebaacfd7d 100644
--- a/llvm/lib/CodeGen/DwarfWriter.cpp
+++ b/llvm/lib/CodeGen/DwarfWriter.cpp
@@ -870,18 +870,20 @@ public:
/// EmitReference - Emit a reference to a label.
///
- void EmitReference(DWLabel Label, bool IsPCRelative = false) const {
- EmitReference(Label.Tag, Label.Number, IsPCRelative);
+ void EmitReference(DWLabel Label, bool IsPCRelative = false,
+ bool Force32Bit = false) const {
+ EmitReference(Label.Tag, Label.Number, IsPCRelative, Force32Bit);
}
void EmitReference(const char *Tag, unsigned Number,
- bool IsPCRelative = false) const {
- PrintRelDirective();
+ bool IsPCRelative = false, bool Force32Bit = false) const {
+ PrintRelDirective(Force32Bit);
PrintLabelName(Tag, Number);
if (IsPCRelative) O << "-" << TAI->getPCSymbol();
}
- void EmitReference(const std::string &Name, bool IsPCRelative = false) const {
- PrintRelDirective();
+ void EmitReference(const std::string &Name, bool IsPCRelative = false,
+ bool Force32Bit = false) const {
+ PrintRelDirective(Force32Bit);
O << Name;
@@ -3479,7 +3481,7 @@ void DIEString::EmitValue(DwarfDebug &DD, unsigned Form) {
/// EmitValue - Emit label value.
///
void DIEDwarfLabel::EmitValue(DwarfDebug &DD, unsigned Form) {
- DD.EmitReference(Label);
+ DD.EmitReference(Label, false, Form == DW_FORM_data4);
}
/// SizeOf - Determine size of label value in bytes.
@@ -3493,7 +3495,7 @@ unsigned DIEDwarfLabel::SizeOf(const DwarfDebug &DD, unsigned Form) const {
/// EmitValue - Emit label value.
///
void DIEObjectLabel::EmitValue(DwarfDebug &DD, unsigned Form) {
- DD.EmitReference(Label);
+ DD.EmitReference(Label, false, Form == DW_FORM_data4);
}
/// SizeOf - Determine size of label value in bytes.
OpenPOWER on IntegriCloud