[cfe-commits] PATCH: Add a custom initialization hook for clang tools.
Douglas Gregor
dgregor at apple.com
Tue Jul 17 14:56:41 PDT 2012
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
More information about the cfe-commits
mailing list