aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2009-09-01 01:57:56 +0000
committerJim Grosbach <grosbach@apple.com>2009-09-01 01:57:56 +0000
commit3fb2b1ede30193b59a651328a946174196b20610 (patch)
treea24c457792ad0101ac817f963c62327ebf1d6135 /lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
parentf98d8fee3c5367622cf03e52f1e1b2251ac6cf3f (diff)
Clean up LSDA name generation and use for SJLJ exception handling. This
makes an eggregious hack somewhat more palatable. Bringing the LSDA forward and making it a GV available for reference would be even better, but is beyond the scope of what I'm looking to solve at this point. Objective C++ code could generate function names that broke the previous scheme. This fixes that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfPrinter.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
index 20b959b914..60ff2c57cd 100644
--- a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
@@ -43,21 +43,27 @@ void Dwarf::PrintRelDirective(bool Force32Bit, bool isInSection) const {
/// PrintLabelName - Print label name in form used by Dwarf writer.
///
-void Dwarf::PrintLabelName(const char *Tag, unsigned Number) const {
- O << MAI->getPrivateGlobalPrefix() << Tag;
+void Dwarf::PrintLabelName(const char *Tag, unsigned Number,
+ bool ForcePrivate) const {
+ if (ForcePrivate)
+ O << MAI->getPrivateGlobalPrefix();
+ O << Tag;
if (Number) O << Number;
}
void Dwarf::PrintLabelName(const char *Tag, unsigned Number,
- const char *Suffix) const {
- O << MAI->getPrivateGlobalPrefix() << Tag;
+ const char *Suffix, bool ForcePrivate) const {
+ if (ForcePrivate)
+ O << MAI->getPrivateGlobalPrefix();
+ O << Tag;
if (Number) O << Number;
O << Suffix;
}
/// EmitLabel - Emit location label for internal use by Dwarf.
///
-void Dwarf::EmitLabel(const char *Tag, unsigned Number) const {
- PrintLabelName(Tag, Number);
+void Dwarf::EmitLabel(const char *Tag, unsigned Number,
+ bool ForcePrivate) const {
+ PrintLabelName(Tag, Number, ForcePrivate);
O << ":\n";
}