[PATCH] D39063: Fix for PR32990.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 15:43:52 PST 2018


rnk added a comment.

Sorry for the delay, I came up with this reduction:

  struct __declspec(dllimport) Foo {
    Foo() {}
    ~Foo() {}
  
    Foo(const Foo &) = delete;
    Foo &operator=(const Foo &) = delete;
  };
  
  void f() { Foo obj; }

After your change, if you compile this with clang at -O0, f will call Foo's vbase destructor, despite Foo not having any virtual bases. This will lead to link errors, since the DLL that exports Foo will not provide a definition of the vbase destructor.


Repository:
  rL LLVM

https://reviews.llvm.org/D39063





More information about the llvm-commits mailing list