diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-04-29 15:09:53 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-04-29 15:09:53 +0000 |
commit | ac3ba1b27e686410f249cb0475909a8d2abfe57d (patch) | |
tree | 5302c55a6b6eec3eda64ed63d7dfffabed1c425e /lib | |
parent | 7b11a4cbdc613c768871a0e4aad4ad3ae7cab5de (diff) | |
download | llvm-ac3ba1b27e686410f249cb0475909a8d2abfe57d.tar.gz llvm-ac3ba1b27e686410f249cb0475909a8d2abfe57d.tar.bz2 llvm-ac3ba1b27e686410f249cb0475909a8d2abfe57d.tar.xz |
The last hack for producing bit identical output with cfi on OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfCFIException.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp b/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp index 7676ef8355..49680ad308 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp @@ -53,6 +53,14 @@ void DwarfCFIException::EndModule() { return; const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering(); + + if (!TLOF.isFunctionEHFrameSymbolPrivate()) { + // This is a temporary hack to keep sections in the same order they + // were before. This lets us produce bit identical outputs while + // transitioning to CFI. + Asm->OutStreamer.SwitchSection(TLOF.getEHFrameSection()); + } + unsigned PerEncoding = TLOF.getPersonalityEncoding(); if ((PerEncoding & 0x70) != dwarf::DW_EH_PE_pcrel) |