diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-04-30 22:29:54 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-04-30 22:29:54 +0000 |
commit | 5265bc483ee52cc9422c104205350a1161567df6 (patch) | |
tree | b46ce05a085cd5ec2e5fbf1cfd34240ea853794e /llvm/lib/MC | |
parent | ed5ca78dc5cdc1838c208502fdd7628d488e6414 (diff) | |
download | bcm5719-llvm-5265bc483ee52cc9422c104205350a1161567df6.tar.gz bcm5719-llvm-5265bc483ee52cc9422c104205350a1161567df6.zip |
Enable CFI on OS X.
Currently the output should be almost identical to the one produced by CodeGen
to make the transition easier.
The only two differences I know of are:
* Some files get an extra advance loc of size 0. This will be fixed when
relaxations are enabled.
* The optimization of declaring an EH symbol as an external variable is not
implemented. This is a subset of adding the nounwind attribute, so we if really
this at -O0 we should probably do it at the IL level.
llvm-svn: 130623
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/MCAsmStreamer.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/MC/MCMachOStreamer.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index be7febfb178..9d5a2c48025 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -1070,6 +1070,9 @@ void MCAsmStreamer::Finish() { // Dump out the dwarf file & directory tables and line tables. if (getContext().hasDwarfFiles() && !UseLoc) MCDwarfFileTable::Emit(this); + + if (getNumFrameInfos() && !UseCFI) + MCDwarfFrameEmitter::Emit(*this); } MCStreamer *llvm::createAsmStreamer(MCContext &Context, diff --git a/llvm/lib/MC/MCMachOStreamer.cpp b/llvm/lib/MC/MCMachOStreamer.cpp index b5a55a75304..350321b9357 100644 --- a/llvm/lib/MC/MCMachOStreamer.cpp +++ b/llvm/lib/MC/MCMachOStreamer.cpp @@ -377,6 +377,9 @@ void MCMachOStreamer::EmitInstToData(const MCInst &Inst) { } void MCMachOStreamer::Finish() { + if (getNumFrameInfos()) + MCDwarfFrameEmitter::Emit(*this); + // We have to set the fragment atom associations so we can relax properly for // Mach-O. |