[PATCH] D33704: [DIBuilder] Add a more fine-grained finalization method

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 09:21:08 PDT 2017


aprantl added a comment.

> https://reviews.llvm.org/D33705 is the clang part of this. @dblaikie had some concerns (on the mailing list) - I had it only call it on cloned subprogram, but @dblaikie thought it might be more natural to call it immediately when irgen is done.

I couldn't find the thread — yes that was what I was wondering, too. It looks like `AllSubprograms` is only used for this purpose and if there is a natural point where to invoke finalize on each SP after IRGen, then this may be better. But it may also complicate all frontends needlessly so I am not sure whether this is a good trade-off. I guess I can be swayed either way.



================
Comment at: include/llvm/IR/DIBuilder.h:91
+    /// subprogram afterwards.
+    void finalizeSP(DISubprogram *SP);
+
----------------
aprantl wrote:
> aprantl wrote:
> > I wonder if `finalizeVariable(DISubprogram *SP)` would be a more accurate name?
> finalizeVariable*s*.
Ok, then how about `finalizeSubprogram()`?


https://reviews.llvm.org/D33704





More information about the llvm-commits mailing list