DmitryPolukhin added a comment.

In http://reviews.llvm.org/D22034#475331, @majnemer wrote:

> Wait, can you give an example of MSVC exporting a vftable but not all the 
> virtual methods (other than the deleting destructor)?  I don't believe I've 
> ever come across an example of this.


It is possible in code like this:
class B {

  virtual void foo();

public:

  virtual void bar();

};

class __declspec(dllexport) D : public B {
public:

  virtual void bar();

};

void B::foo() {}
void B::bar() {}
void D::bar() {}

Here is B::foo is not exported but required to build vftable for D. Also user 
may want to explicitly control what should be exported from his library and may 
decide to remove some functions from exported interface.


http://reviews.llvm.org/D22034



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to