summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DIE.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-08-24 01:14:27 +0000
committerEric Christopher <echristo@apple.com>2012-08-24 01:14:27 +0000
commit873cf0a0d7906083578d9b793008348750636138 (patch)
tree880a394475f2856680ba8ed1b6e5ac1dce18cc79 /lib/CodeGen/AsmPrinter/DIE.cpp
parent3887a902a1b8e5a6aad4fc822479845ce3ba0dfe (diff)
downloadllvm-873cf0a0d7906083578d9b793008348750636138.tar.gz
llvm-873cf0a0d7906083578d9b793008348750636138.tar.bz2
llvm-873cf0a0d7906083578d9b793008348750636138.tar.xz
Use DW_FORM_flag_present to save space in debug information if we're
not in darwin gdb compat mode. Fixes rdar://10975088 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DIE.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIE.cpp b/lib/CodeGen/AsmPrinter/DIE.cpp
index 3776848e3f..c55e5f7b53 100644
--- a/lib/CodeGen/AsmPrinter/DIE.cpp
+++ b/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -182,6 +182,12 @@ void DIEValue::dump() {
void DIEInteger::EmitValue(AsmPrinter *Asm, unsigned Form) const {
unsigned Size = ~0U;
switch (Form) {
+ case dwarf::DW_FORM_flag_present:
+ // Emit something to keep the lines and comments in sync.
+ // FIXME: Is there a better way to do this?
+ if (Asm->OutStreamer.hasRawTextSupport())
+ Asm->OutStreamer.EmitRawText(StringRef(""));
+ return;
case dwarf::DW_FORM_flag: // Fall thru
case dwarf::DW_FORM_ref1: // Fall thru
case dwarf::DW_FORM_data1: Size = 1; break;
@@ -203,6 +209,8 @@ void DIEInteger::EmitValue(AsmPrinter *Asm, unsigned Form) const {
///
unsigned DIEInteger::SizeOf(AsmPrinter *AP, unsigned Form) const {
switch (Form) {
+ case dwarf::DW_FORM_flag_present: // Fall thru
+ return 0;
case dwarf::DW_FORM_flag: // Fall thru
case dwarf::DW_FORM_ref1: // Fall thru
case dwarf::DW_FORM_data1: return sizeof(int8_t);