mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 20:16:05 +00:00

This matches what GCC does in these situations. This fixes compiling Qt in debug mode. In release mode, references to the vtable of this particular class ends up optimized away, but in debug mode, the compiler creates references to the vtable, which is expected to be dllexported from a different DLL. Make sure the dllexported version actually ends up emitted. Differential Revision: https://reviews.llvm.org/D55698 llvm-svn: 349256
23 lines
692 B
C++
23 lines
692 B
C++
// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -std=c++11 -o - %s | FileCheck --check-prefix=GNU %s
|
|
|
|
class __declspec(dllexport) QAbstractLayoutStyleInfo {
|
|
public:
|
|
QAbstractLayoutStyleInfo() : m_isWindow(false) {}
|
|
virtual ~QAbstractLayoutStyleInfo() {}
|
|
|
|
virtual bool hasChangedCore() const { return false; }
|
|
|
|
virtual void invalidate() {}
|
|
|
|
virtual double windowMargin(bool orientation) const = 0;
|
|
|
|
bool isWindow() const { return m_isWindow; }
|
|
|
|
protected:
|
|
bool m_isWindow;
|
|
};
|
|
|
|
// GNU-DAG: @_ZTV24QAbstractLayoutStyleInfo = weak_odr dso_local dllexport
|
|
// GNU-DAG: @_ZTS24QAbstractLayoutStyleInfo = linkonce_odr
|
|
// GNU-DAG: @_ZTI24QAbstractLayoutStyleInfo = linkonce_odr
|