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

Chandler Carruth chandlerc at google.com
Thu Jul 21 23:56:59 PDT 2011


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/20110721/05adec4e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cl_add_version_hook.patch
Type: text/x-patch
Size: 2360 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110721/05adec4e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cl_move_target_printing.patch
Type: text/x-patch
Size: 3993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110721/05adec4e/attachment-0001.bin>


More information about the llvm-commits mailing list