diff options
author | John McCall <rjmccall@apple.com> | 2010-10-18 21:28:44 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-10-18 21:28:44 +0000 |
commit | 18e4edae821990cd84130511b4077560b738f408 (patch) | |
tree | 7c1009205630006f97ffe6e659c89aeb57996029 /clang/test/CodeGenCXX/mangle-abi-examples.cpp | |
parent | 408beac59732e3b4181c04bf438283a71ee96ac5 (diff) | |
download | bcm5719-llvm-18e4edae821990cd84130511b4077560b738f408.tar.gz bcm5719-llvm-18e4edae821990cd84130511b4077560b738f408.zip |
Fix some bugs in local class mangling brought up in PR8355.
Patch by Richard Smith!
llvm-svn: 116752
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-abi-examples.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/mangle-abi-examples.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-abi-examples.cpp b/clang/test/CodeGenCXX/mangle-abi-examples.cpp new file mode 100644 index 00000000000..7124078320b --- /dev/null +++ b/clang/test/CodeGenCXX/mangle-abi-examples.cpp @@ -0,0 +1,27 @@ +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s + +// CHECK: @_ZTVZ3foovEN1C1DE = +// CHECK: @_ZTVZN1A3fooEiE1B = +// CHECK: define {{.*}} @_ZZZ3foovEN1C3barEvEN1E3bazEv( + +// Itanium C++ ABI examples. +struct A { + void foo (int) { + struct B { virtual ~B() {} }; + B(); + } +}; +void foo () { + struct C { + struct D { virtual ~D() {} }; + void bar () { + struct E { + void baz() { } + }; + E().baz(); + } + }; + A().foo(0); + C::D(); + C().bar(); +} |