mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
Untangle a snarl that I discovered when updating the mangler,
starting in getCurrentFunctionEHName. Among other problems, we would try to privative a "foo.eh" label, but end up emitting the label as _Lfoo.eh instead of L_foo.eh on darwin. This is really bad, and the linker has always tolerated these labels existing. For now, just emit them as _foo.eh. This patch also fixes problems with ".eh" labels on unnamed functions and eliminates two strangely defined TargetAsmInfo hooks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76231 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user