[PATCH] D50099: [DebugInfo][OpenCL] Address post-commit review of D49930

Eric Christopher via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 6 11:16:01 PDT 2018


echristo added a comment.

In https://reviews.llvm.org/D50099#1189667, @scott.linder wrote:

> When I went to mark these as static I noticed they use `CGDebugInfo::CreateMemberType` which uses a couple other non-static member functions, and it starts to become difficult to tease things out into nice clean static functions.


Ah. Fair. No worries then.



================
Comment at: lib/CodeGen/CGDebugInfo.cpp:997
   llvm::DINode::DIFlags Flags = llvm::DINode::FlagAppleBlock;
   unsigned LineNo = 0;
 
----------------
scott.linder wrote:
> echristo wrote:
> > Just noticed that LineNo is 0... for the entire function.
> What should it be instead? My understanding is that LineNo=0 indicates there is no corresponding source, and these fields seem to be implementation details.
Could probably just replace it with a constant 0 in the calls rather than having the local?


https://reviews.llvm.org/D50099





More information about the cfe-commits mailing list