summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-04-29 15:09:53 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-04-29 15:09:53 +0000
commit1fc5bf9fc55caeba79695bfa96ca4324f5bc87b7 (patch)
treed43b012997be6fcbe6ff90ed67911ba81f830788 /llvm
parent697edc89a5ff29e72c36cc18281ce7e4e3c6edc0 (diff)
downloadbcm5719-llvm-1fc5bf9fc55caeba79695bfa96ca4324f5bc87b7.tar.gz
bcm5719-llvm-1fc5bf9fc55caeba79695bfa96ca4324f5bc87b7.zip
The last hack for producing bit identical output with cfi on OS X.
llvm-svn: 130504
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
index 7676ef8355a..49680ad3089 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud