aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp14
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfException.cpp10
2 files changed, 9 insertions, 15 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 7a5d24c..e352922 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -264,17 +264,11 @@ bool AsmPrinter::doFinalization(Module &M) {
return false;
}
-const std::string &
-AsmPrinter::getCurrentFunctionEHName(const MachineFunction *MF,
- std::string &Name) const {
+std::string
+AsmPrinter::getCurrentFunctionEHName(const MachineFunction *MF) const {
assert(MF && "No machine function?");
- Name = MF->getFunction()->getName();
- if (Name.empty())
- Name = Mang->getMangledName(MF->getFunction());
-
- // FIXME: THIS SEEMS REALLY WRONG, it will get two prefixes.
- Name = Mang->makeNameProper(TAI->getEHGlobalPrefix() + Name + ".eh");
- return Name;
+ return Mang->getMangledName(MF->getFunction(), ".eh",
+ TAI->is_EHSymbolPrivate());
}
void AsmPrinter::SetupMachineFunction(MachineFunction &MF) {
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index 37466ab..b17b163 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -57,8 +57,8 @@ void DwarfException::EmitCommonEHFrame(const Function *Personality,
// Begin eh frame section.
Asm->SwitchToTextSection(TAI->getDwarfEHFrameSection());
- if (!TAI->doesRequireNonLocalEHFrameLabel())
- O << TAI->getEHGlobalPrefix();
+ if (TAI->is_EHSymbolPrivate())
+ O << TAI->getPrivateGlobalPrefix();
O << "EH_frame" << Index << ":\n";
EmitLabel("section_eh_frame", Index);
@@ -194,7 +194,8 @@ void DwarfException::EmitEHFrame(const FunctionEHFrameInfo &EHFrameInfo) {
EmitLabel("eh_frame_begin", EHFrameInfo.Number);
- if (TAI->doesRequireNonLocalEHFrameLabel()) {
+ if (!TAI->is_EHSymbolPrivate()) {
+// FIXME: HOW ARE THESE TWO ARMS DIFFERENT?? EH_frame vs eh_frame_common?
PrintRelDirective(true, true);
PrintLabelName("eh_frame_begin", EHFrameInfo.Number);
@@ -690,9 +691,8 @@ void DwarfException::EndFunction() {
EmitExceptionTable();
// Save EH frame information
- std::string Name;
EHFrames.push_back(
- FunctionEHFrameInfo(getAsm()->getCurrentFunctionEHName(MF, Name),
+ FunctionEHFrameInfo(getAsm()->getCurrentFunctionEHName(MF),
SubprogramCount,
MMI->getPersonalityIndex(),
MF->getFrameInfo()->hasCalls(),