[cfe-commits] Micro-patch: Unify VoidModuleLoaders
Argyrios Kyrtzidis
kyrtzidis at apple.com
Mon Nov 5 13:08:40 PST 2012
On Nov 5, 2012, at 12:05 PM, Kim Gräsman <kim.grasman at gmail.com> wrote:
> Hi Argyrios, Doug,
>
> On Mon, Nov 5, 2012 at 8:50 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
> On Nov 5, 2012, at 11:44 AM, Argyrios Kyrtzidis <kyrtzidis at apple.com> wrote:
>
> > Could we change the Preprocessor to accept an optional pointer to a ModuleLoader ?
>
> 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".
>
> > This will eliminate the whole "VoidModuleLoader" business and the hack of having the ASTUnit "implement" a ModuleLoader just so we have something to pass to the Preprocessor when loading an AST file.
>
> I didn't know about that hack. If there was a VoidModuleLoader next to ModuleLoader, you could use that ;-)
>
> - Kim
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121105/20709d82/attachment.html>
More information about the cfe-commits
mailing list