Skip to content
This repository has been archived by the owner on Dec 20, 2019. It is now read-only.

Commit

Permalink
Rename the temp labels used by DwarfMonoException so they don't colli…
Browse files Browse the repository at this point in the history
…de with the ones used by the GNU EH frame.
  • Loading branch information
vargaz committed May 18, 2017
1 parent 975e3a6 commit 5056b9f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/CodeGen/AsmPrinter/DwarfMonoException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,14 +426,14 @@ void DwarfMonoException::EmitMonoLSDA(const FunctionEHFrameInfo *EFI) {
const MonoCallSiteEntry &S = *I;

MCSymbol *EHFuncBeginSym =
Asm->GetTempSymbol("eh_func_begin", FunctionNumber);
Asm->GetTempSymbol("mono_eh_func_begin", FunctionNumber);

MCSymbol *BeginLabel = S.BeginLabel;
if (BeginLabel == 0)
BeginLabel = EHFuncBeginSym;
MCSymbol *EndLabel = S.EndLabel;
if (EndLabel == 0)
EndLabel = Asm->GetTempSymbol("eh_func_end", FunctionNumber);
EndLabel = Asm->GetTempSymbol("mono_eh_func_end", FunctionNumber);

Asm->OutStreamer.AddComment("Region start");
Asm->EmitLabelDifference(BeginLabel, EHFuncBeginSym, 4);
Expand Down Expand Up @@ -545,7 +545,7 @@ void DwarfMonoException::EmitMonoEHFrame(const Function *Personality)
//
Streamer.AddComment("mono method idx");
Streamer.EmitIntValue (EHFrameInfo.MonoEH.MonoMethodIdx, 4);
MCSymbol *FDEBeginSym = Asm->GetTempSymbol ("mono_eh_func_begin", EHFrameInfo.Number);
MCSymbol *FDEBeginSym = Asm->GetTempSymbol ("mono_eh_fde_begin", EHFrameInfo.Number);
Asm->EmitLabelDifference(FDEBeginSym, EHFrameHdrSym, 4);
}
// Emit a last entry to simplify binary searches and to enable the computation of
Expand All @@ -557,8 +557,8 @@ void DwarfMonoException::EmitMonoEHFrame(const Function *Personality)
const FunctionEHFrameInfo &EHFrameInfo = EHFrames [EHFrames.size() - 1];
int Index = EHFrameInfo.Number;
// Emit the size of the last function, since it cannot be computed using the next table entry
MCSymbol *Sym1 = Asm->GetTempSymbol("eh_func_begin", Index);
MCSymbol *Sym2 = Asm->GetTempSymbol("eh_func_end", Index);
MCSymbol *Sym1 = Asm->GetTempSymbol("mono_eh_func_begin", Index);
MCSymbol *Sym2 = Asm->GetTempSymbol("mono_eh_func_end", Index);
Asm->EmitLabelDifference(Sym2, Sym1, 4);
MCSymbol *Sym3 = Asm->GetTempSymbol ("mono_eh_frame_end");
Asm->EmitLabelDifference(Sym3, EHFrameHdrSym, 4);
Expand Down Expand Up @@ -592,7 +592,7 @@ void DwarfMonoException::EmitMonoEHFrame(const Function *Personality)
const FunctionEHFrameInfo &EHFrameInfo = *I;
int Index = EHFrameInfo.Number;

MCSymbol *FDEBeginSym = Asm->GetTempSymbol ("mono_eh_func_begin", Index);
MCSymbol *FDEBeginSym = Asm->GetTempSymbol ("mono_eh_fde_begin", Index);
Streamer.EmitLabel(FDEBeginSym);

// No need for length, CIE, PC begin, PC range, alignment
Expand All @@ -617,7 +617,7 @@ void DwarfMonoException::EmitMonoEHFrame(const Function *Personality)

CFAOffset = CIECFAOffset;

MCSymbol *BeginSym = Asm->GetTempSymbol("eh_func_begin", Index);
MCSymbol *BeginSym = Asm->GetTempSymbol("mono_eh_func_begin", Index);
EmitCFIInstructions(Streamer, EHFrameInfo.Instructions, BeginSym, &EHFrameInfo.EHLabels, CFAOffset, dataAlignmentFactor);

Streamer.AddBlankLine();
Expand All @@ -635,14 +635,14 @@ DwarfMonoException::~DwarfMonoException() {}

void DwarfMonoException::beginFunction(const MachineFunction *MF)
{
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_begin",
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("mono_eh_func_begin",
Asm->getFunctionNumber()));
EHLabels.clear();
}

void DwarfMonoException::endFunction(const MachineFunction *MF)
{
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_end",
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("mono_eh_func_end",
Asm->getFunctionNumber()));

MMI->TidyLandingPads();
Expand Down

0 comments on commit 5056b9f

Please sign in to comment.