[PATCH] D30718: [cfi] Add test for type metadata split issue.

Evgeniy Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 13:48:20 PST 2017


eugenis created this revision.

https://reviews.llvm.org/D30716


Repository:
  rL LLVM

https://reviews.llvm.org/D30718

Files:
  test/cfi/bad-split.cpp


Index: test/cfi/bad-split.cpp
===================================================================
--- /dev/null
+++ test/cfi/bad-split.cpp
@@ -0,0 +1,19 @@
+// GlobalSplit used to lose type metadata for classes with virtual bases but no virtual methods.
+// RUN: %clangxx_cfi -o %t1 %s && %t1
+
+struct Z {
+};
+
+struct ZZ : public virtual Z {
+};
+
+struct A : public ZZ {
+};
+
+struct B : public A {
+};
+
+int main() {
+  A* a = new B();
+  B *b = (B*)a;
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30718.90929.patch
Type: text/x-patch
Size: 463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170307/73a343ee/attachment.bin>


More information about the llvm-commits mailing list