diff options
-rw-r--r-- | lib/CodeGen/CGCXXClass.cpp | 3 | ||||
-rw-r--r-- | test/CodeGenCXX/virt.cpp | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/CodeGen/CGCXXClass.cpp b/lib/CodeGen/CGCXXClass.cpp index 56a28fc9a0..533aabc861 100644 --- a/lib/CodeGen/CGCXXClass.cpp +++ b/lib/CodeGen/CGCXXClass.cpp @@ -31,6 +31,9 @@ ComputeNonVirtualBaseClassOffset(ASTContext &Context, CXXBasePaths &Paths, const ASTRecordLayout &Layout = Context.getASTRecordLayout(Element.Class); const CXXBaseSpecifier *BS = Element.Base; + // FIXME: enable test3 from virt.cc to not abort. + if (BS->isVirtual()) + return 0; assert(!BS->isVirtual() && "Should not see virtual bases here!"); const CXXRecordDecl *Base = diff --git a/test/CodeGenCXX/virt.cpp b/test/CodeGenCXX/virt.cpp index 424f9095d7..eaab159204 100644 --- a/test/CodeGenCXX/virt.cpp +++ b/test/CodeGenCXX/virt.cpp @@ -4,8 +4,6 @@ // RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -emit-llvm %s -o %t-64.ll // RUN: FileCheck -check-prefix LPLL64 --input-file=%t-64.ll %s -// XFAIL: * - struct B { virtual void bar1(); virtual void bar2(); @@ -709,7 +707,7 @@ void test16_D::bar() { } // CHECK-LPLL64: ret %class.test8_D* %10 // CHECK-LPLL64:} -// CHECK-LPLL64:define weak %class.test8_D* @_ZTch0_v16_n32_N8test16_D4foo1Ev36(%class.test8_D*) { +// CHECK-LPLL64:define weak %class.test8_D* @_ZTch0_v16_n32_N8test16_D4foo1Ev(%class.test8_D*) { // CHECK-LPLL64:entry: // CHECK-LPLL64: %retval = alloca %class.test8_D* // CHECK-LPLL64: %.addr = alloca %class.test8_D* @@ -912,10 +910,10 @@ class test20_D : public test20_B, public test20_B1 { class test21_V { - virtual void foo(); + virtual void foo() { } }; class test21_V1 { - virtual void foo(); + virtual void foo() { } }; class test21_B : virtual test21_V { }; |