aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-06-22 01:25:12 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-06-22 01:25:12 +0000
commitffccd923101ae177c1a2c407618d8f03a312d69b (patch)
treeb5d081f57a101bb12b897e4d91e79cb1c0db698d /include
parente0231413225cf47aaf3238bf21afd0d59025028d (diff)
downloadexternal_llvm-ffccd923101ae177c1a2c407618d8f03a312d69b.zip
external_llvm-ffccd923101ae177c1a2c407618d8f03a312d69b.tar.gz
external_llvm-ffccd923101ae177c1a2c407618d8f03a312d69b.tar.bz2
Emit relocations for DW_AT_location entries on systems which need it. This is
a recommit of r127757. Fixes PR9493. Patch by Paul Robinson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h7
-rw-r--r--include/llvm/MC/MCAsmInfo.h12
2 files changed, 14 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index 56a87f1..170a528 100644
--- a/include/llvm/CodeGen/AsmPrinter.h
+++ b/include/llvm/CodeGen/AsmPrinter.h
@@ -354,6 +354,13 @@ namespace llvm {
void EmitLabelPlusOffset(const MCSymbol *Label, uint64_t Offset,
unsigned Size) const;
+ /// EmitLabelReference - Emit something like ".long Label"
+ /// where the size in bytes of the directive is specified by Size and Label
+ /// specifies the label.
+ void EmitLabelReference(const MCSymbol *Label, unsigned Size) const {
+ EmitLabelPlusOffset(Label, 0, Size);
+ }
+
//===------------------------------------------------------------------===//
// Dwarf Emission Helper Routines
//===------------------------------------------------------------------===//
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h
index ae0dad2..21b484c 100644
--- a/include/llvm/MC/MCAsmInfo.h
+++ b/include/llvm/MC/MCAsmInfo.h
@@ -319,9 +319,11 @@ namespace llvm {
/// relocation when we want a section offset in dwarf.
bool DwarfRequiresRelocationForSectionOffset; // Defaults to true;
- /// DwarfUsesLabelOffsetDifference - True if Dwarf2 output can
- /// use EmitLabelOffsetDifference.
- bool DwarfUsesLabelOffsetForRanges;
+ /// DwarfUsesRelocationsAcrossSections - True if Dwarf2 output generally
+ /// uses relocations for references to other .debug_* sections.
+ // FIXME: Can we replace DwarfRequiresRelocationForSectionOffset
+ // with this?
+ bool DwarfUsesRelocationsAcrossSections;
/// DwarfUsesRelocationsForStringPool - True if this Dwarf output must use
/// relocations to refer to entries in the string pool.
@@ -552,8 +554,8 @@ namespace llvm {
bool doesDwarfRequireRelocationForSectionOffset() const {
return DwarfRequiresRelocationForSectionOffset;
}
- bool doesDwarfUseLabelOffsetForRanges() const {
- return DwarfUsesLabelOffsetForRanges;
+ bool doesDwarfUseRelocationsAcrossSections() const {
+ return DwarfUsesRelocationsAcrossSections;
}
bool doesDwarfUseRelocationsForStringPool() const {
return DwarfUsesRelocationsForStringPool;