[PATCH] D47108: Add -fforce-emit-vtables

2018-05-21 Thread Krzysztof Pszeniczny via Phabricator via cfe-commits
amharc added a comment. I think that `MarkVTableUsed` should be called somewhere in Sema (possibly `ActOnFinishCXXMemberDecls`?) if `ForceEmitVTables` is on. This probably requires making `ForceEmitVTables` a `LangOption` in addition to it being a `CodeGenOption`. This causes the above

[PATCH] D47108: Add -fforce-emit-vtables

2018-05-21 Thread Krzysztof Pszeniczny via Phabricator via cfe-commits
amharc requested changes to this revision. amharc added a comment. This revision now requires changes to proceed. This is not sound: sometimes the forcefully emitted vtable is incorrect due to destructor aliasing. This happens e.g. in the Bullet benchmark from the llvm test suite. A simplified