diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-07-13 17:21:42 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-07-13 17:21:42 +0000 |
commit | 4ba675006b5a8edfc48b6a9bd3dcf54a70cc08f2 (patch) | |
tree | 48b44512b5db8ced345df4a1a56b5065cf2a14d9 /test/CodeGenCXX/mangle-unnamed.cpp | |
parent | d7279c4c177bca357ef96ff1379fd9bc420bfe83 (diff) |
Diffstat (limited to 'test/CodeGenCXX/mangle-unnamed.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle-unnamed.cpp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/test/CodeGenCXX/mangle-unnamed.cpp b/test/CodeGenCXX/mangle-unnamed.cpp index 4aec7dbf4a76f..83b46d69454ea 100644 --- a/test/CodeGenCXX/mangle-unnamed.cpp +++ b/test/CodeGenCXX/mangle-unnamed.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -emit-llvm-only -verify %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s struct S { virtual ~S() { } @@ -37,3 +37,35 @@ struct A { }; int f4() { return A().a(); } + +int f5() { + static union { + int a; + }; + + // CHECK: _ZZ2f5vE1a + return a; +} + +int f6() { + static union { + union { + int : 1; + }; + int b; + }; + + // CHECK: _ZZ2f6vE1b + return b; +} + +int f7() { + static union { + union { + int b; + } a; + }; + + // CHECK: _ZZ2f7vE1a + return a.b; +} |