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

Eric Christopher echristo at apple.com
Fri Jul 22 00:14:58 PDT 2011


On Jul 21, 2011, at 11:56 PM, Chandler Carruth 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.
> <cl_add_version_hook.patch><cl_move_target_printing.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

With the updated patch it looks fine to me. It'd be nice to get this out of TargetRegistery.

-eric



More information about the llvm-commits mailing list