[llvm-commits] PATCH: Begin fixing layering violation where CommandLine.cpp includes and uses the TargetRegistry

Chandler Carruth chandlerc at google.com
Fri Jul 22 00:09:06 PDT 2011


Er, glaring bug in the first patch. Updated version attached.

On Thu, Jul 21, 2011 at 11:56 PM, Chandler Carruth <chandlerc at google.com>wrote:

> Essentially the CommandLine library was plundering the TargetRegistry
> directly to print out the set of registered targets. The first patch adds a
> hook to the CommandLine library which allows tools to register a function
> which prints additional version information (rather than completely
> replacing the version information, the currently available hook). The second
> patch hoists the logic for printing registered targets into the
> TargetRegistry itself. Please review!
>
> I'm now working on the two final, and really mechanical changes. The first
> is merely to teach all the tools with a TargetRegistry to use the
> CommandLine hook, and stop printing them by default. The second moves the
> implementation of TargetRegistry (currently in the *support* library!!!)
> into the Target library where it belongs, and where its header already
> lives. Let me know if there are any concerns with these two changes, but
> they seem obvious enough to just commit.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110722/47ad4c4c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cl_add_version_hook.patch
Type: text/x-patch
Size: 2690 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110722/47ad4c4c/attachment.bin>


More information about the llvm-commits mailing list