summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCFIException.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCFIException.cpp8
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)