[PATCH] D16931: [codeview] Describe int local variables using .cv_def_range

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 16:50:45 PST 2016


On Tue, Feb 9, 2016 at 4:25 PM, David Majnemer via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> majnemer added inline comments.
>
> ================
> Comment at: lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:569
> @@ +568,3 @@
> +  OS.AddComment("TypeIndex");
> +  OS.EmitIntValue(TypeIndex::Int32().getIndex(), 4);
> +  OS.AddComment("Flags");
> ----------------
> rnk wrote:
> > majnemer wrote:
> > > dblaikie wrote:
> > > > Some comments here might not go astray (what is the format of these
> records you're emitting (maybe a broad comment at the top describing the
> format overall, then details on each field))
> > > >
> > > > Specifically I don't know what the 4 here and 2, below (flags), are.
> > > They (4 and 2) are the size of the value in bytes.  Otherwise,
> `EmitIntValue` wouldn't know how much data to emit.
> > The on-disk format is described as structs in
> llvm/DebugInfo/CodeView/SymbolRecord.h and TypeRecord.h. All the
> information that we know about any of these fields should probably live
> there, not here. I guess I can say "see SymbolRecord.h".
> We could do `sizeof(uint32_t)` and `sizeof(Flags)`.
>

Totally shooting from the hip - but I vaguely recalled that there was an
API that's higher level and does this sort of thing for you (I think the
AsmPrinter API does that for you, and MCStreamer doesn't, maybe?) - perhaps
just use AsmStreamer. But I might be completely misremembering all of this.


>
>
> http://reviews.llvm.org/D16931
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160209/69f4d404/attachment.html>


More information about the llvm-commits mailing list