mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-24 09:29:42 +00:00
Formatting changes. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e59fbc04ad
commit
a8c9e6a943
@ -50,8 +50,7 @@ using namespace llvm;
|
|||||||
|
|
||||||
// Note: when DWARF2_LINE_MIN_INSN_LENGTH == 1 which is the current setting,
|
// Note: when DWARF2_LINE_MIN_INSN_LENGTH == 1 which is the current setting,
|
||||||
// this routine is a nop and will be optimized away.
|
// this routine is a nop and will be optimized away.
|
||||||
static inline uint64_t ScaleAddrDelta(uint64_t AddrDelta)
|
static inline uint64_t ScaleAddrDelta(uint64_t AddrDelta) {
|
||||||
{
|
|
||||||
if (DWARF2_LINE_MIN_INSN_LENGTH == 1)
|
if (DWARF2_LINE_MIN_INSN_LENGTH == 1)
|
||||||
return AddrDelta;
|
return AddrDelta;
|
||||||
if (AddrDelta % DWARF2_LINE_MIN_INSN_LENGTH != 0) {
|
if (AddrDelta % DWARF2_LINE_MIN_INSN_LENGTH != 0) {
|
||||||
@ -895,46 +894,45 @@ namespace llvm {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCDwarfFrameEmitter::Emit(MCStreamer &streamer,
|
void MCDwarfFrameEmitter::Emit(MCStreamer &Streamer,
|
||||||
bool usingCFI,
|
bool UsingCFI,
|
||||||
bool isEH) {
|
bool IsEH) {
|
||||||
MCContext &context = streamer.getContext();
|
MCContext &Context = Streamer.getContext();
|
||||||
const TargetAsmInfo &asmInfo = context.getTargetAsmInfo();
|
const TargetAsmInfo &AsmInfo = Context.getTargetAsmInfo();
|
||||||
const MCSection §ion = isEH ?
|
const MCSection &Section = IsEH ? *AsmInfo.getEHFrameSection() :
|
||||||
*asmInfo.getEHFrameSection() :
|
*AsmInfo.getDwarfFrameSection();
|
||||||
*asmInfo.getDwarfFrameSection();
|
Streamer.SwitchSection(&Section);
|
||||||
streamer.SwitchSection(§ion);
|
MCSymbol *SectionStart = Context.CreateTempSymbol();
|
||||||
MCSymbol *SectionStart = context.CreateTempSymbol();
|
Streamer.EmitLabel(SectionStart);
|
||||||
streamer.EmitLabel(SectionStart);
|
|
||||||
|
|
||||||
MCSymbol *fdeEnd = NULL;
|
MCSymbol *FDEEnd = NULL;
|
||||||
DenseMap<CIEKey, const MCSymbol*> CIEStarts;
|
DenseMap<CIEKey, const MCSymbol*> CIEStarts;
|
||||||
FrameEmitterImpl Emitter(usingCFI, isEH, SectionStart);
|
FrameEmitterImpl Emitter(UsingCFI, IsEH, SectionStart);
|
||||||
|
|
||||||
const MCSymbol *DummyDebugKey = NULL;
|
const MCSymbol *DummyDebugKey = NULL;
|
||||||
for (unsigned i = 0, n = streamer.getNumFrameInfos(); i < n; ++i) {
|
for (unsigned i = 0, n = Streamer.getNumFrameInfos(); i < n; ++i) {
|
||||||
const MCDwarfFrameInfo &frame = streamer.getFrameInfo(i);
|
const MCDwarfFrameInfo &Frame = Streamer.getFrameInfo(i);
|
||||||
CIEKey key(frame.Personality, frame.PersonalityEncoding,
|
if (IsEH && AsmInfo.getCompactUnwindSection() &&
|
||||||
frame.LsdaEncoding);
|
Emitter.EmitCompactUnwind(Streamer, Frame))
|
||||||
const MCSymbol *&cieStart = isEH ? CIEStarts[key] : DummyDebugKey;
|
|
||||||
if (isEH && asmInfo.getCompactUnwindSection() &&
|
|
||||||
Emitter.EmitCompactUnwind(streamer, frame))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!cieStart)
|
CIEKey Key(Frame.Personality, Frame.PersonalityEncoding,
|
||||||
cieStart = &Emitter.EmitCIE(streamer, frame.Personality,
|
Frame.LsdaEncoding);
|
||||||
frame.PersonalityEncoding, frame.Lsda,
|
const MCSymbol *&CIEStart = IsEH ? CIEStarts[Key] : DummyDebugKey;
|
||||||
frame.LsdaEncoding);
|
if (!CIEStart)
|
||||||
|
CIEStart = &Emitter.EmitCIE(Streamer, Frame.Personality,
|
||||||
|
Frame.PersonalityEncoding, Frame.Lsda,
|
||||||
|
Frame.LsdaEncoding);
|
||||||
|
|
||||||
fdeEnd = Emitter.EmitFDE(streamer, *cieStart, frame);
|
FDEEnd = Emitter.EmitFDE(Streamer, *CIEStart, Frame);
|
||||||
|
|
||||||
if (i != n - 1)
|
if (i != n - 1)
|
||||||
streamer.EmitLabel(fdeEnd);
|
Streamer.EmitLabel(FDEEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
streamer.EmitValueToAlignment(asmInfo.getPointerSize());
|
Streamer.EmitValueToAlignment(AsmInfo.getPointerSize());
|
||||||
if (fdeEnd)
|
if (FDEEnd)
|
||||||
streamer.EmitLabel(fdeEnd);
|
Streamer.EmitLabel(FDEEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCDwarfFrameEmitter::EmitAdvanceLoc(MCStreamer &Streamer,
|
void MCDwarfFrameEmitter::EmitAdvanceLoc(MCStreamer &Streamer,
|
||||||
|
Loading…
Reference in New Issue
Block a user