diff options
author | Anders Carlsson <andersca@mac.com> | 2009-10-06 17:54:23 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-10-06 17:54:23 +0000 |
commit | b299d3516d4722ef527b1070bb87133427e621a3 (patch) | |
tree | dc01a184cefb261537d7805a8286a48559724bd9 /test/CodeGenCXX/virtual-function-calls.cpp | |
parent | 6961fdd661f75b8452f526143b9f60b54e175c9d (diff) |
Pass the right type to GetAddrOfFunction when getting functions for the VTable. Fixes PR5021.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/virtual-function-calls.cpp')
-rw-r--r-- | test/CodeGenCXX/virtual-function-calls.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGenCXX/virtual-function-calls.cpp b/test/CodeGenCXX/virtual-function-calls.cpp new file mode 100644 index 0000000000..4002859638 --- /dev/null +++ b/test/CodeGenCXX/virtual-function-calls.cpp @@ -0,0 +1,16 @@ +// PR5021 +struct A { + virtual void f(char); +}; + +void f(A *a) { + a->f('c'); +} +// PR5021 +struct A { + virtual void f(char); +}; + +void f(A *a) { + a->f('c'); +} |