Sorry, I meant DIBuilder. On Fri, Feb 18, 2011 at 1:32 PM, Talin <viridia at gmail.com> wrote:> I didn't know DIFactory existed until you mentioned it just now. > > And if folks are adding brand new classes to LLVM, can we not follow the > naming conventions in the developer guidelines? > > On Fri, Feb 18, 2011 at 5:14 AM, Renato Golin <rengolin at systemcall.org>wrote: > >> Seems the last use of DIFactory in LLVM/Clang is in: >> >> clang/lib/CodeGen/CGDebugInfo.cpp to get the enums >> llvm::DIFactory::OpDeref and llvm::DIFactory::OpPlus. >> >> Shouldn't this be moved to DIBuilder and remove the dependency completely? >> >> -- >> cheers, >> --renato >> >> http://systemcall.org/ >> >> Reclaim your digital rights, eliminate DRM, learn more at >> http://www.defectivebydesign.org/what_is_drm >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > > > -- > -- Talin >-- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110218/7b0fbe36/attachment.html>
On 18 February 2011 21:34, Talin <viridia at gmail.com> wrote:> Sorry, I meant DIBuilder.DIBuilder is the new DIFactory. I've been playing with it this week and it's much easier and straightforward to use. I'm still having problems to create arrays, though. As far as I remember (from the 2010 meeting), the idea was to replace and deprecate DIFactory. I'm not saying we should do it now, just saying Clang should have no more deps on the old DIFactory to avoid header pollution, since it's only on one enum... ;) cheers, --renato
On Fri, Feb 18, 2011 at 1:52 PM, Renato Golin <rengolin at systemcall.org>wrote:> On 18 February 2011 21:34, Talin <viridia at gmail.com> wrote: > > Sorry, I meant DIBuilder. > > DIBuilder is the new DIFactory. I've been playing with it this week > and it's much easier and straightforward to use. I'm still having > problems to create arrays, though. > > As far as I remember (from the 2010 meeting), the idea was to replace > and deprecate DIFactory. > > I'm not saying we should do it now, just saying Clang should have no > more deps on the old DIFactory to avoid header pollution, since it's > only on one enum... ;) > > Yeah, I remember that conversation - I just didn't know that any action hadbeen taken. However, my other concern is this: According to the LLVM Coding Standards document (http://llvm.org/docs/CodingStandards.html#ll_naming): *Function names* should be verb phrases (as they represent actions), and command-like function should be imperative. The name should be camel case, and start with a lower case letter (e.g. openFile() or isFoo()). The coding standards say functions should begin with a lower case letter, but I see a lot of new code (not just DIBuilder) that uses method names that begin with an upper case letter. Is the document incorrect, or is there basically no enforcement? -- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110218/c163935f/attachment.html>
On Fri, Feb 18, 2011 at 1:52 PM, Renato Golin <rengolin at systemcall.org>wrote:> On 18 February 2011 21:34, Talin <viridia at gmail.com> wrote: > > Sorry, I meant DIBuilder. > > DIBuilder is the new DIFactory. I've been playing with it this week > and it's much easier and straightforward to use. I'm still having > problems to create arrays, though. > > As far as I remember (from the 2010 meeting), the idea was to replace > and deprecate DIFactory. > > I'm not saying we should do it now, just saying Clang should have no > more deps on the old DIFactory to avoid header pollution, since it's > only on one enum... ;) > > cheers, > --renato >A couple of other questions about DIBuilder: 1) I notice that there's no 'isMain' parameter to CreateCompileUnit. How do you specify the main module? 2) There's no means to set TheCU other than creating a new compile unit. This means that you have to generate all of the debug info for your module with a single DIBuilder instance, since there's no way to use a pre-existing compile unit. -- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110218/5f76dee6/attachment.html>
On Fri, Feb 18, 2011 at 1:52 PM, Renato Golin <rengolin at systemcall.org>wrote:> On 18 February 2011 21:34, Talin <viridia at gmail.com> wrote: > > Sorry, I meant DIBuilder. > > DIBuilder is the new DIFactory. I've been playing with it this week > and it's much easier and straightforward to use. I'm still having > problems to create arrays, though. >OK I switched all my stuff over to use DIBuilder, and you are right - the arrays don't work. Everything else does though.> > As far as I remember (from the 2010 meeting), the idea was to replace > and deprecate DIFactory. > > I'm not saying we should do it now, just saying Clang should have no > more deps on the old DIFactory to avoid header pollution, since it's > only on one enum... ;) > > cheers, > --renato >-- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110219/a97b307e/attachment.html>