From 2151725325214dbcf8fa7914e81399205499692c Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 15 Dec 2009 03:31:17 +0000 Subject: Fix a small bug in ComputeMethodVtableIndices. llvm-svn: 91411 --- clang/test/CodeGenCXX/virt-call-offsets.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 clang/test/CodeGenCXX/virt-call-offsets.cpp (limited to 'clang/test/CodeGenCXX/virt-call-offsets.cpp') diff --git a/clang/test/CodeGenCXX/virt-call-offsets.cpp b/clang/test/CodeGenCXX/virt-call-offsets.cpp new file mode 100644 index 00000000000..db0ba2f483b --- /dev/null +++ b/clang/test/CodeGenCXX/virt-call-offsets.cpp @@ -0,0 +1,8 @@ +// RUN: clang -cc1 %s -emit-llvm -o - | FileCheck %s + +struct A { virtual void a(); }; +struct B : A {}; +struct C : B { virtual void a(); }; +void (C::*x)() = &C::a; + +// CHECK: @x = global %0 { i{{[0-9]+}} 1, i{{[0-9]+}} 0 } -- cgit v1.2.3