majnemer added a comment. Thinking about this some more, it is possible for clang to emit code that will make everybody happy:
If a class is being constructed in a constexpr context and all the vftable entries it references are marked import, emit local vftables and reference them in the object. If a vftable entry it references is not marked import, report an error. If a class is constructed via operator new and all the vftable entries it references are marked import, emit local vftables and store it in the object after the constructors run. If a vftable entry it references is not marked import, report an error. If a class is constructed via a local or global variable and all the vftable entries it references are marked import, create a `dllimport available_externally` vftable. Otherwise create a normal `dllimport external` vftable. I believe this behavior captures the best behavior across the spectrum of functionality we all care about: it supports devirtualization, constexpr and importing classes which don't have all their vftable methods exported. http://reviews.llvm.org/D22034 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits