[cfe-commits] Micro-patch: Unify VoidModuleLoaders

Kim Gräsman kim.grasman at gmail.com
Mon Nov 5 13:13:16 PST 2012


On Mon, Nov 5, 2012 at 10:08 PM, Argyrios Kyrtzidis <kyrtzidis at apple.com>wrote:

>
> Since Preprocessor has a getModuleLoader() method, that would force
> null-checks on all callers. Currently only 2 of them, so no big deal, but I
> tend to shy away from exposing NULLs.
>
>
> How about if you don't pass an implementation of ModuleLoader, the
> preprocessor creates internally the "VoidModuleLoader".
>

Sure, that's also an option. It just occurred to me that another
alternative might be to have ModuleLoader itself implement loadModule by
default.

- Kim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121105/92de2526/attachment.html>


More information about the cfe-commits mailing list