Two simple files. If I compile with reduced BMI, I get a linker error.

`foo.cppm`:
```
export module foo_mod;

import std;

export struct Foo {
    virtual ~Foo() {}
    void bar() {
        std::cout << "In Foo::bar()\n";
    }
};
```

`main.cc`:
```
import foo_mod;
int main() {
    Foo foo;
    foo.bar();
}
```

If I precompile and compile `foo.cppm` normally, it all runs. If I use the reduced BMI method, passing the extra args to produce the second PCM: `-fexperimental-modules-reduced-bmi -fmodule-output=foo.red.pcm`, then I end up with this error when linking:

```
Undefined symbols for architecture x86_64:
  "vtable for Foo@foo_mod", referenced from:
      Foo@foo_mod::Foo() in main.o
   NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
```

C++ module with reduced BMI causes undefined vtable error
This is a GitHub Issue
repo:llvm-project
owner:llvm
Title : C++ module with reduced BMI causes undefined vtable error
Issue date:

--- start body ---
Two simple files. If I compile with reduced BMI, I get a linker error.

`foo.cppm`:
```
export module foo_mod;

import std;

export struct Foo {
    virtual ~Foo() {}
    void bar() {
        std::cout << "In Foo::bar()\n";
    }
};
```

`main.cc`:
```
import foo_mod;
int main() {
    Foo foo;
    foo.bar();
}
```

If I precompile and compile `foo.cppm` normally, it all runs. If I use the reduced BMI method, passing the extra args to produce the second PCM: `-fexperimental-modules-reduced-bmi -fmodule-output=foo.red.pcm`, then I end up with this error when linking:

```
Undefined symbols for architecture x86_64:
  "vtable for Foo@foo_mod", referenced from:
      Foo@foo_mod::Foo() in main.o
   NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
```

--- end body ---
