diff options
Diffstat (limited to 'test/Modules/Inputs/merge-vtable-codegen/b.h')
-rw-r--r-- | test/Modules/Inputs/merge-vtable-codegen/b.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Modules/Inputs/merge-vtable-codegen/b.h b/test/Modules/Inputs/merge-vtable-codegen/b.h new file mode 100644 index 0000000..770e460 --- /dev/null +++ b/test/Modules/Inputs/merge-vtable-codegen/b.h @@ -0,0 +1,17 @@ +#ifndef B_H +#define B_H + +#include "a.h" + +class B : virtual public A { + virtual void x() {} +}; + +void b(A* p) { + p->x(); + // Instantiating a class that virtually inherits 'A' + // triggers calculation of the vtable offsets in 'A'. + B b; +} + +#endif |