[cfe-commits] PATCH: Add a custom initialization hook for clang tools.

Alexander Kornienko alexfh at google.com
Wed Jul 18 05:39:49 PDT 2012


On Tue, Jul 17, 2012 at 11:56 PM, Douglas Gregor <dgregor at apple.com> wrote:

>
> On Jul 17, 2012, at 7:47 AM, Alexander Kornienko <alexfh at google.com>
> wrote:
>
> > This patch adds a custom initialize hook for clang tools. This is useful
> for plugging in custom initialization in private code bases and IDEs.
> Currently it can be used by compiling with a -DUSE_CUSTOM_TOOL_INIT and
> linking in an implementation for the customToolInit function.
>
> This kind of #define-based hack doesn't have a lot of precedent in Clang
> or LLVM. What is the point of this custom initialization hook? Why does it
> have to be a #define hacked into the build of Clang itself (which is
> supposed to be a reusable *library*) rather than being introduced via a
> plugin or by setting some function pointer/callback somewhere?
>
> This feels very much like the wrong solution for the problem you're trying
> to solve, but you haven't actually told us what problem you're trying to
> solve.
>
>         - Doug
>
You're right, we're going to find a better solution for our issue. I've
removed this hook in r160432.


-- 
Best regards,
Alexander Kornienko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120718/30effc86/attachment.html>


More information about the cfe-commits mailing list