summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index e9f685eb88f..e22b993d569 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -1270,9 +1270,10 @@ const MCSymbol &FrameEmitterImpl::EmitCIE(MCObjectStreamer &streamer,
streamer.EmitIntValue(CIE_ID, 4);
// Version
+ // For .eh_frame, we use CIE version 1
// For DWARF2, we use CIE version 1
// For DWARF3+, we use CIE version 3
- uint8_t CIEVersion = context.getDwarfVersion() <= 2 ? 1 : 3;
+ uint8_t CIEVersion = (IsEH || context.getDwarfVersion() <= 2) ? 1 : 3;
streamer.EmitIntValue(CIEVersion, 1);
// Augmentation String
OpenPOWER on IntegriCloud