summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2008-12-19 10:55:56 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2008-12-19 10:55:56 +0000
commit770b4b830a96c365bd12b6ea9219c5aee5aa74f4 (patch)
tree99d7c4e3b844919cfa9e0de5e662b661d64e855c /llvm/lib/CodeGen/AsmPrinter
parent3cde35175c897dad5f9ccd04fe4f22aa17937e95 (diff)
downloadbcm5719-llvm-770b4b830a96c365bd12b6ea9219c5aee5aa74f4.tar.gz
bcm5719-llvm-770b4b830a96c365bd12b6ea9219c5aee5aa74f4.zip
Fix bug 3202.
The EH_frame and .eh symbols are now private, except for darwin9 and earlier. The patch also fixes the definition of PrivateGlobalPrefix on pcc linux. llvm-svn: 61242
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp3
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index b640a589bad..e3cc3b0a270 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -239,7 +239,8 @@ std::string AsmPrinter::getCurrentFunctionEHName(const MachineFunction *MF) {
std::string Name = MF->getFunction()->getName();
if (Name.empty())
Name = Mang->getValueName(MF->getFunction());
- return Mang->makeNameProper(Name + ".eh", TAI->getGlobalPrefix());
+ return Mang->makeNameProper(TAI->getEHGlobalPrefix() +
+ Name + ".eh", TAI->getGlobalPrefix());
}
void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index e41e4cbb6e0..88589d584da 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
@@ -2962,7 +2962,7 @@ private:
// Begin eh frame section.
Asm->SwitchToTextSection(TAI->getDwarfEHFrameSection());
- O << "EH_frame" << Index << ":\n";
+ O << TAI->getEHGlobalPrefix() << "EH_frame" << Index << ":\n";
EmitLabel("section_eh_frame", Index);
// Define base labels.
OpenPOWER on IntegriCloud