r193815 - Clang modules: collect exports recursively

Dmitri Gribenko gribozavr at gmail.com
Mon Nov 4 11:56:33 PST 2013


On Fri, Nov 1, 2013 at 6:57 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> On Fri, Nov 1, 2013 at 6:47 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>> On Thu, Oct 31, 2013 at 6:47 PM, Richard Smith <richard at metafoo.co.uk> wrote:
>>> I had a go at writing a test for this (attached). However... my test fails
>>> both with and without your change.
>>
>> Indeed.  Seems like it fails because:
>> - recursive_visibility_a.inner is not imported (only recursive_visibility_a is),
>> - thus the 'inner' submodule is not showing up in any of the import lists,
>> - and because of this getExportedModules() is not returning the
>> correct module set -- it only considers modules that are imported.
>
> Oh, and this means that this modification to your testcase:
>
> - at import recursive_visibility_a;
> + at import recursive_visibility_a.inner;
>
> Actually produces a testcase that used to fail, but now passes.

I have found a way to handle the original testcase as well.  Please
take a look: http://llvm-reviews.chandlerc.com/D2100

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list