mpark wrote:
> > Repro:
>
> >
>
> > ```c++
>
> > // RUN: rm -rf %t
>
> > // RUN: mkdir -p %t
>
> > // RUN: split-file %s %t
>
> > // RUN: cd %t
>
> > //
>
> >
>
> > // RUN: %clang_cc1 -fmodule-name=A -fno-cxx-modules -xc++ -emit-module \
>
> > // RUN: -fmodules A.cppmap -o A.pcm
>
> > // RUN: %clang_cc1 -fmodule-name=B -fno-cxx-modules -xc++ -emit-module \
>
> > // RUN: -fmodules -fmodule-file=A.pcm B.cppmap -o B.pcm
>
> > // RUN: %clang_cc1 -fmodule-name=C -fno-cxx-modules -xc++ -emit-module \
>
> > // RUN: -fmodules C.cppmap -o C.pcm
>
> > // RUN: %clang_cc1 -fmodule-name=D -fno-cxx-modules -xc++ -emit-module \
>
> > // RUN: -fmodules -fmodule-file=C.pcm D.cppmap -o D.pcm
>
> > // RUN: %clang_cc1 -fmodule-name=E -fno-cxx-modules -xc++ -emit-module \
>
> > // RUN: -fmodules -fmodule-file=B.pcm E.cppmap -o E.pcm
>
> > // RUN: %clang_cc1 -fmodule-name=F -fno-cxx-modules -xc++ -emit-module \
>
> > // RUN: -fmodules -fmodule-file=D.pcm F.cppmap -o F.pcm
>
> > // RUN: %clang_cc1 -fmodule-name=G -fno-cxx-modules -xc++ -emit-module \
>
> > // RUN: -fmodules -fmodule-file=E.pcm -fmodule-file=F.pcm G.cppmap -o
> > G.pcm
>
> > // RUN: %clang_cc1 -fno-cxx-modules -fmodules -fmodule-file=G.pcm src.cpp \
>
> > // RUN: -o /dev/null
>
> >
>
> > //--- A.cppmap
>
> > module "A" { header "A.h" }
>
> >
>
> > //--- A.h
>
> > int x;
>
> >
>
> > //--- B.cppmap
>
> > module "B" {}
>
> >
>
> > //--- C.cppmap
>
> > module "C" { header "D.h" }
>
> >
>
> > //--- D.cppmap
>
> > module "D" {}
>
> >
>
> > //--- D.h
>
> > namespace xyz {}
>
> >
>
> > //--- E.cppmap
>
> > module "E" {}
>
> >
>
> > //--- F.cppmap
>
> > module "F" { header "F.h" }
>
> >
>
> > //--- F.h
>
> > namespace xyz { inline void func() {} }
>
> >
>
> > //--- G.cppmap
>
> > module "G" { header "G.h" }
>
> >
>
> > //--- G.h
>
> > #include "F.h"
>
> > namespace { void func2() { xyz::func(); } }
>
> >
>
> > //--- hdr.h
>
> > #include "F.h"
>
> > namespace xyz_ns = xyz;
>
> >
>
> > //--- src.cpp
>
> > #include "hdr.h"
>
> > ```
>
> >
>
> > Fails with this:
>
> >
>
> > ```
>
> > In file included from src.cpp:1:
>
> > ./hdr.h:2:20: error: declaration of 'xyz' must be imported from module 'C'
> > before it is required
>
> > 2 | namespace xyz_ns = xyz;
>
> > | ^
>
> > ```
>
>
>
> @mpark do I understand correctly that this hasn't been fixed yet? Should the
> commit be reverted until there's a fix available (also for the issue reported
> by @boomanaiden154, if it's a distinct problem)? There's been a few commits
> on top of this one. Later commits in this area will make reverting this
> locally (what we've been doing for a couple of weeks now) more and more
> complex.
Hello, thank you for the repro! Yes, the problem has not been fixed yet. You're
right, I think we should revert for now unfortunately. I won't be able to work
on this at least until next week.
https://github.com/llvm/llvm-project/pull/171769
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits