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

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 12 16:09:30 PDT 2018


rsmith accepted this revision.
rsmith added a comment.

LGTM with one change.



================
Comment at: clang/include/clang/Basic/LangOptions.def:292
 
+BENIGN_LANGOPT(ForceEmitVTables, 1, 0,
+               "whether to emit all vtables")
----------------
I don't think this is benign or even compatible: if we compile a PCH with this turned off, and then try to emit code using that PCH, we can miscompile due to having not marked the contents of a vtable as used. Please change this from `BENIGN_LANGOPT` to just `LANGOPT`.


Repository:
  rL LLVM

https://reviews.llvm.org/D47108





More information about the cfe-commits mailing list