[PATCH] Add new debug kind LocTrackingOnly.

Diego Novillo dnovillo at google.com
Fri Jun 20 13:10:47 PDT 2014


On Fri, Jun 20, 2014 at 3:44 PM, David Blaikie <dblaikie at gmail.com> wrote:

>
> I'm not sure whether adding the value to this enum is the right
> option, since we'll never see it in the backend (since the attribute
> is added to the CU, which won't be used by LLVM whenever this
> enumerator is used), but it does fit with the other values here.
>

Yeah, the new value in the backend's enum seems a bit contrived. It is used
exactly once in the DIBuilder. I had initially opted to make it an extra
flag for DIBuilder::createCompileUnit, but this seemed conceptually
cleaner. One thing that I had in mind was that we may want to do something
with it later.

For instance, it may be that LocTrackingOnly can be used to not do some
bookkeeping or other activities that we currently do for the other debug
modes. I admit it seems a bit contrived now. In


>
> Eric - what do you reckon? Use a separate flag just for DIBuilder to
> know that it should omit the dbg.cu node, or add it to this existing
> flag even though it'll never end up in an actually useful CU metadata
> node (unlike the other two values)?
>

Well, it does end up in a metadata node, we stash it as an operand to the
CUNode we create in DIBuilder::createCompileUnit. That's the only reason
why I thought it may be useful later.  If you don't think that will be the
case, I can just add a boolean flag to the function.



Diego.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140620/e96e9af5/attachment.html>


More information about the llvm-commits mailing list