From 53992adde3eda3ccf9da63bc7e45673f043de18f Mon Sep 17 00:00:00 2001 From: rdivacky Date: Thu, 27 May 2010 15:17:06 +0000 Subject: Update clang to r104832. --- test/CodeGenCXX/mangle-subst-std.cpp | 44 +++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) (limited to 'test/CodeGenCXX/mangle-subst-std.cpp') diff --git a/test/CodeGenCXX/mangle-subst-std.cpp b/test/CodeGenCXX/mangle-subst-std.cpp index 062610b..4c15eaa 100644 --- a/test/CodeGenCXX/mangle-subst-std.cpp +++ b/test/CodeGenCXX/mangle-subst-std.cpp @@ -1,5 +1,16 @@ // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s +// Check mangling of Vtables, VTTs, and construction vtables that +// involve standard substitutions. + +// CHECK: @_ZTVSd = weak_odr constant +// CHECK: @_ZTCSd0_Si = internal constant +// CHECK: @_ZTCSd16_So = internal constant +// CHECK: @_ZTTSd = weak_odr constant +// CHECK: @_ZTVSo = weak_odr constant +// CHECK: @_ZTTSo = weak_odr constant +// CHECK: @_ZTVSi = weak_odr constant +// CHECK: @_ZTTSi = weak_odr constant namespace std { struct A { A(); }; @@ -32,9 +43,30 @@ namespace std { void f(std::string) { } namespace std { - template struct basic_istream { }; - template struct basic_ostream { }; - template struct basic_iostream { }; + template struct basic_ios { + basic_ios(int); + virtual ~basic_ios(); + }; + template > + struct basic_istream : virtual public basic_ios { + basic_istream(int x) : basic_ios(x), stored(x) { } + + int stored; + }; + template > + struct basic_ostream : virtual public basic_ios { + basic_ostream(int x) : basic_ios(x), stored(x) { } + + float stored; + }; + + template > + struct basic_iostream : public basic_istream, + public basic_ostream { + basic_iostream(int x) : basic_istream(x), + basic_ostream(x), + basic_ios(x) { } + }; } // CHECK: _Z1fSi @@ -61,3 +93,9 @@ namespace std template struct basic_string { }; typedef basic_string, std::allocator > not_string; void f(not_string) { } + +// Manglings for instantiations caused by this function are at the +// top of the test. +void create_streams() { + std::basic_iostream bio(17); +} -- cgit v1.1