[PATCH] Emit DWARF info for all code section in an assembly file

Eric Christopher echristo at gmail.com
Tue Feb 4 11:26:37 PST 2014


On Tue, Feb 4, 2014 at 10:26 AM, Adrian Prantl <aprantl at apple.com> wrote:
> Hi Oliver,
>
> generally, Doxygen comments for the new functions never hurt.
>
> One question:
> It looks like we're hardcoding a version here:
>
> -  // The 2 byte DWARF version, which is 2.
> -  MCOS->EmitIntValue(2, 2);
> +  // The 2 byte DWARF version, which is 3.
> +  MCOS->EmitIntValue(3, 2);
>
> Shouldn't this be somehow derived from the version attribute in the module?
> E.g., clang -gdwarf-2 will result in a Module attribute like
>
>   !0 = metadata !{i32 2, metadata !"Dwarf Version", i32 2},
>
> and then for example, we should never emit anything that needs Dwarf3 features.

No metadata in an assembly file :)

That said it should be controlled by command line option if you don't
mind Oliver. -gdwarf-N.

Thanks!

-eric

>
> -- adrian
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list