[PATCH] Support DWARF discriminators in object streamer.

Diego Novillo dnovillo at google.com
Fri Feb 14 06:39:23 PST 2014


On Thu, Feb 13, 2014 at 10:01 PM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:

> With that, the test should pass if you remove the -g, no?

No, because -g writes the necessary debug info markers for
llvm-dwarfdump to produce its report. Without -g, llvm-dwarfdump
prints nothing when executed.

I can remove -g from the first one, however, the .rel_debug_line
contents are slightly different without it, but it does pick the
discriminator information.


Diego.

diff --git a/test/MC/ELF/discriminator.s b/test/MC/ELF/discriminator.s
index af6b447..2b6ee69 100644
--- a/test/MC/ELF/discriminator.s
+++ b/test/MC/ELF/discriminator.s
@@ -1,4 +1,4 @@
-# RUN: llvm-mc -g -triple i386-unknown-unknown %s -filetype=obj -o -
| llvm-readobj -r | FileCheck %s
+# RUN: llvm-mc -triple i386-unknown-unknown %s -filetype=obj -o - |
llvm-readobj -r | FileCheck %s
 # RUN: llvm-mc -g -triple i386-unknown-unknown %s -filetype=obj -o -
| llvm-dwarfdump -debug-dump=line - | FileCheck %s
-check-prefix=DWARF-DUMP

     .text
@@ -12,7 +12,7 @@ foo:

 # CHECK:      Relocations [
 # CHECK:        Section ({{[^ ]+}}) .rel.debug_line {
-# CHECK-NEXT:     0x5B R_386_32 .text 0x0
+# CHECK-NEXT:     0x2D R_386_32 .text 0x0
 # CHECK-NEXT:   }

 # DWARF-DUMP: Address            Line   Column File   ISA Discriminator Flags




More information about the llvm-commits mailing list