ChuanqiXu9 wrote:
> Using `-fgen-reduced-bmi` currently fails for me with a case that looks like
> this:
>
> ```c++
> // a.hpp
> template <typename T>
> void ignore(T const &) noexcept {}
>
> inline void resultCheck(char const *message) {
> ignore(message);
> }
>
> // b.cppm
> module;
> #include "a.hpp"
> export module b;
>
> export {
> using ignore;
> using resultCheck;
> }
>
> // c.cppm
> export module c;
> import b;
>
> export void test() {
> resultCheck(nullptr);
> }
> ```
>
> This will result in this linker error: `undefined reference to void
> ignore<char const*>(char const* const&)`. Removing `-fgen-reduced-bmi` will
> result in linking without errors. Do I need to pass certain flags to CMake?
This may be fixed in trunk. This should be a bug in Reduced BMI. Note that the
current patch is only the driver part of Reduced BMI. And this is the reason
why we need a new flag. Otherwise I'll propose to enable it by default : )
https://github.com/llvm/llvm-project/pull/85050
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits