forked from OSchip/llvm-project
Simply LSDA lable emission to use a direct special-case output instead of
EmitLabel() llvm-svn: 80677
This commit is contained in:
parent
770a532fa1
commit
9372f4d7d5
|
@ -459,9 +459,8 @@ ComputeCallSiteTable(SmallVectorImpl<CallSiteEntry> &CallSites,
|
||||||
FirstActions[P.PadIndex]
|
FirstActions[P.PadIndex]
|
||||||
};
|
};
|
||||||
|
|
||||||
// Try to merge with the previous call-site. SJLJ doesn't do this
|
// Try to merge with the previous call-site.
|
||||||
if (PreviousIsInvoke &&
|
if (PreviousIsInvoke) {
|
||||||
MAI->getExceptionHandlingType() == ExceptionHandling::Dwarf) {
|
|
||||||
CallSiteEntry &Prev = CallSites.back();
|
CallSiteEntry &Prev = CallSites.back();
|
||||||
if (Site.PadLabel == Prev.PadLabel && Site.Action == Prev.Action) {
|
if (Site.PadLabel == Prev.PadLabel && Site.Action == Prev.Action) {
|
||||||
// Extend the range of the previous entry.
|
// Extend the range of the previous entry.
|
||||||
|
@ -606,7 +605,7 @@ void DwarfException::EmitExceptionTable() {
|
||||||
std::string LSDAName =
|
std::string LSDAName =
|
||||||
Asm->Mang->makeNameProper(std::string("LSDA_") + out.str(),
|
Asm->Mang->makeNameProper(std::string("LSDA_") + out.str(),
|
||||||
Mangler::Private);
|
Mangler::Private);
|
||||||
EmitLabel(LSDAName.c_str(), 0, false);
|
O << LSDAName << ":\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emit the header.
|
// Emit the header.
|
||||||
|
|
|
@ -43,27 +43,21 @@ void Dwarf::PrintRelDirective(bool Force32Bit, bool isInSection) const {
|
||||||
|
|
||||||
/// PrintLabelName - Print label name in form used by Dwarf writer.
|
/// PrintLabelName - Print label name in form used by Dwarf writer.
|
||||||
///
|
///
|
||||||
void Dwarf::PrintLabelName(const char *Tag, unsigned Number,
|
void Dwarf::PrintLabelName(const char *Tag, unsigned Number) const {
|
||||||
bool ForcePrivate) const {
|
O << MAI->getPrivateGlobalPrefix() << Tag;
|
||||||
if (ForcePrivate)
|
|
||||||
O << MAI->getPrivateGlobalPrefix();
|
|
||||||
O << Tag;
|
|
||||||
if (Number) O << Number;
|
if (Number) O << Number;
|
||||||
}
|
}
|
||||||
void Dwarf::PrintLabelName(const char *Tag, unsigned Number,
|
void Dwarf::PrintLabelName(const char *Tag, unsigned Number,
|
||||||
const char *Suffix, bool ForcePrivate) const {
|
const char *Suffix) const {
|
||||||
if (ForcePrivate)
|
O << MAI->getPrivateGlobalPrefix() << Tag;
|
||||||
O << MAI->getPrivateGlobalPrefix();
|
|
||||||
O << Tag;
|
|
||||||
if (Number) O << Number;
|
if (Number) O << Number;
|
||||||
O << Suffix;
|
O << Suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// EmitLabel - Emit location label for internal use by Dwarf.
|
/// EmitLabel - Emit location label for internal use by Dwarf.
|
||||||
///
|
///
|
||||||
void Dwarf::EmitLabel(const char *Tag, unsigned Number,
|
void Dwarf::EmitLabel(const char *Tag, unsigned Number) const {
|
||||||
bool ForcePrivate) const {
|
PrintLabelName(Tag, Number);
|
||||||
PrintLabelName(Tag, Number, ForcePrivate);
|
|
||||||
O << ":\n";
|
O << ":\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,18 +100,16 @@ namespace llvm {
|
||||||
void PrintLabelName(const DWLabel &Label) const {
|
void PrintLabelName(const DWLabel &Label) const {
|
||||||
PrintLabelName(Label.getTag(), Label.getNumber());
|
PrintLabelName(Label.getTag(), Label.getNumber());
|
||||||
}
|
}
|
||||||
|
void PrintLabelName(const char *Tag, unsigned Number) const;
|
||||||
void PrintLabelName(const char *Tag, unsigned Number,
|
void PrintLabelName(const char *Tag, unsigned Number,
|
||||||
bool ForcePrivate = true) const;
|
const char *Suffix) const;
|
||||||
void PrintLabelName(const char *Tag, unsigned Number,
|
|
||||||
const char *Suffix, bool ForcePrivate = true) const;
|
|
||||||
|
|
||||||
/// EmitLabel - Emit location label for internal use by Dwarf.
|
/// EmitLabel - Emit location label for internal use by Dwarf.
|
||||||
///
|
///
|
||||||
void EmitLabel(const DWLabel &Label) const {
|
void EmitLabel(const DWLabel &Label) const {
|
||||||
EmitLabel(Label.getTag(), Label.getNumber());
|
EmitLabel(Label.getTag(), Label.getNumber());
|
||||||
}
|
}
|
||||||
void EmitLabel(const char *Tag, unsigned Number,
|
void EmitLabel(const char *Tag, unsigned Number) const;
|
||||||
bool ForcePrivate = true) const;
|
|
||||||
|
|
||||||
/// EmitReference - Emit a reference to a label.
|
/// EmitReference - Emit a reference to a label.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue