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

Adrian Prantl aprantl at apple.com
Tue Feb 4 11:30:20 PST 2014


On Feb 4, 2014, at 11:26, Eric Christopher <echristo at gmail.com> wrote:

> 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 :)

I will have to start reading the first line of emails in the future.. sorry!

-- adrian




More information about the llvm-commits mailing list