summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorKeith Walker <kwalker@arm.com>2015-05-12 15:25:08 +0000
committerKeith Walker <kwalker@arm.com>2015-05-12 15:25:08 +0000
commitea9483f8473c6c6d86b226d69fe314d45a14b34b (patch)
treeeeaa28b55784c3e6bb403229c204fdd56a9ba97c /llvm/lib/MC/MCDwarf.cpp
parent7713e6849dd18dbafee5c7f1f231ccbe34b95ac6 (diff)
downloadbcm5719-llvm-ea9483f8473c6c6d86b226d69fe314d45a14b34b.tar.gz
bcm5719-llvm-ea9483f8473c6c6d86b226d69fe314d45a14b34b.zip
[DWARF] Add CIE header fields address_size and segment_size when generating dwarf-4
The DWARF-4 specification added 2 new fields in the CIE header called address_size and segment_size. Create these 2 new fields when generating dwarf-4 CIE entries, print out the new fields when dumping the CIE and update tests Differential Revision: http://reviews.llvm.org/D9558 llvm-svn: 237145
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index a8cb384054e..890b03170b0 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -1302,6 +1302,14 @@ const MCSymbol &FrameEmitterImpl::EmitCIE(MCObjectStreamer &streamer,
}
streamer.EmitIntValue(0, 1);
+ if (CIEVersion >= 4) {
+ // Address Size
+ streamer.EmitIntValue(context.getAsmInfo()->getPointerSize(), 1);
+
+ // Segment Descriptor Size
+ streamer.EmitIntValue(0, 1);
+ }
+
// Code Alignment Factor
streamer.EmitULEB128IntValue(context.getAsmInfo()->getMinInstAlignment());
OpenPOWER on IntegriCloud