available, the only thing this affects is that we produce
.set in one case we didn't before, which shouldn't harm
anything. Make EmitSectionOffset call EmitDifference
instead of duplicating it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98005
91177308-0d34-0410-b5e6-
96231b3b80d8
///
void DIESectionOffset::EmitValue(DwarfPrinter *D, unsigned Form) const {
bool IsSmall = Form == dwarf::DW_FORM_data4;
- D->EmitSectionOffset(Label, Section, IsSmall, IsEH, UseSet);
+ D->EmitSectionOffset(Label, Section, IsSmall, IsEH);
D->getAsm()->O << '\n'; // FIXME: Necesssary?
}
#ifndef NDEBUG
void DIESectionOffset::print(raw_ostream &O) {
O << "Off: " << Label->getName() << "-" << Section->getName()
- << "-" << IsEH << "-" << UseSet;
+ << "-" << IsEH;
}
#endif
const MCSymbol *Label;
const MCSymbol *Section;
bool IsEH : 1;
- bool UseSet : 1;
public:
DIESectionOffset(const MCSymbol *Lab, const MCSymbol *Sec,
- bool isEH = false, bool useSet = true)
+ bool isEH = false)
: DIEValue(isSectionOffset), Label(Lab), Section(Sec),
- IsEH(isEH), UseSet(useSet) {}
+ IsEH(isEH) {}
/// EmitValue - Emit section offset.
///
///
void DwarfDebug::addSectionOffset(DIE *Die, unsigned Attribute, unsigned Form,
const MCSymbol *Label,const MCSymbol *Section,
- bool isEH, bool useSet) {
- DIEValue *Value = new DIESectionOffset(Label, Section, isEH, useSet);
+ bool isEH) {
+ DIEValue *Value = new DIESectionOffset(Label, Section, isEH);
DIEValues.push_back(Value);
Die->addValue(Attribute, Form, Value);
}
///
void addSectionOffset(DIE *Die, unsigned Attribute, unsigned Form,
const MCSymbol *Label, const MCSymbol *Section,
- bool isEH = false, bool useSet = true);
+ bool isEH = false);
/// addDelta - Add a label delta attribute data and value.
///
EmitSectionOffset(getDWLabel("eh_frame_begin", EHFrameInfo.Number),
getDWLabel("eh_frame_common",
EHFrameInfo.PersonalityIndex),
- true, true, false);
+ true, true);
EOL("FDE CIE offset");
void DwarfPrinter::EmitSectionOffset(const MCSymbol *Label,
const MCSymbol *Section,
- bool IsSmall, bool isEH,
- bool useSet) {
+ bool IsSmall, bool isEH) {
bool printAbsolute = false;
if (isEH)
printAbsolute = MAI->isAbsoluteEHSectionOffsets();
else
printAbsolute = MAI->isAbsoluteDebugSectionOffsets();
- if (MAI->hasSetDirective() && useSet) {
- // FIXME: switch to OutStreamer.EmitAssignment.
- O << "\t.set\t";
- PrintLabelName("set", SetCounter, Flavor);
- O << ",";
- PrintLabelName(Label);
-
- if (!printAbsolute) {
- O << "-";
- PrintLabelName(Section);
- }
-
- O << "\n";
- PrintRelDirective(IsSmall);
- PrintLabelName("set", SetCounter, Flavor);
- ++SetCounter;
- } else {
- PrintRelDirective(IsSmall, true);
- PrintLabelName(Label);
-
- if (!printAbsolute) {
- O << "-";
- PrintLabelName(Section);
- }
- }
+ if (!printAbsolute)
+ return EmitDifference(Label, Section, IsSmall);
+
+ PrintRelDirective(IsSmall, true);
+ PrintLabelName(Label);
}
/// EmitFrameMoves - Emit frame instructions to describe the layout of the
/// EmitDifference - Emit the difference between two labels.
void EmitDifference(const MCSymbol *LabelHi, const MCSymbol *LabelLo,
bool IsSmall = false);
+
void EmitSectionOffset(const MCSymbol *Label, const MCSymbol *Section,
- bool IsSmall = false, bool isEH = false,
- bool useSet = true);
+ bool IsSmall = false, bool isEH = false);
/// EmitFrameMoves - Emit frame instructions to describe the layout of the
/// frame.
; RUN: llc < %s -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t
; RUN: grep { = } %t | count 7
-; RUN: grep set %t | count 16
+; RUN: grep set %t | count 18
; RUN: grep globl %t | count 6
; RUN: grep weak %t | count 1
; RUN: grep hidden %t | count 1