mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 05:56:28 +00:00
Add CFIStartSections to the asm printer. Add an assert that at least
one of the sections is created. llvm-svn: 131124
This commit is contained in:
parent
ecdabf3295
commit
33cc7a8f74
@ -193,6 +193,7 @@ public:
|
||||
unsigned Isa, unsigned Discriminator,
|
||||
StringRef FileName);
|
||||
|
||||
virtual void EmitCFISections(bool EH, bool Debug);
|
||||
virtual void EmitCFIStartProc();
|
||||
virtual void EmitCFIEndProc();
|
||||
virtual void EmitCFIDefCfa(int64_t Register, int64_t Offset);
|
||||
@ -764,6 +765,24 @@ void MCAsmStreamer::EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
|
||||
EmitEOL();
|
||||
}
|
||||
|
||||
void MCAsmStreamer::EmitCFISections(bool EH, bool Debug) {
|
||||
MCStreamer::EmitCFISections(EH, Debug);
|
||||
|
||||
if (!UseCFI)
|
||||
return;
|
||||
|
||||
OS << "\t.cfi_sections ";
|
||||
if (EH) {
|
||||
OS << ".eh_frame";
|
||||
if (Debug)
|
||||
OS << ", .debug_frame";
|
||||
} else if (Debug) {
|
||||
OS << ".debug_frame";
|
||||
}
|
||||
|
||||
EmitEOL();
|
||||
}
|
||||
|
||||
void MCAsmStreamer::EmitCFIStartProc() {
|
||||
MCStreamer::EmitCFIStartProc();
|
||||
|
||||
|
@ -178,6 +178,7 @@ void MCStreamer::EmitLabel(MCSymbol *Symbol) {
|
||||
}
|
||||
|
||||
void MCStreamer::EmitCFISections(bool EH, bool Debug) {
|
||||
assert(EH || Debug);
|
||||
EmitEHFrame = EH;
|
||||
EmitDebugFrame = Debug;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user