From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CodeGenCXX/mangle-alias-template.cpp | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 clang/test/CodeGenCXX/mangle-alias-template.cpp (limited to 'clang/test/CodeGenCXX/mangle-alias-template.cpp') diff --git a/clang/test/CodeGenCXX/mangle-alias-template.cpp b/clang/test/CodeGenCXX/mangle-alias-template.cpp new file mode 100644 index 0000000..5ace0b0 --- /dev/null +++ b/clang/test/CodeGenCXX/mangle-alias-template.cpp @@ -0,0 +1,48 @@ +// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s + +template struct alloc {}; +template using Alloc = alloc; +template> struct vector {}; + +template using Vec = vector; + +template void f(Vec v); +template void g(T); + +template class F> void h(F); + +template struct S {}; +template using U = S; +template void h(U, Ts...); + +// CHECK: define void @_Z1zv( +void z() { + vector VI; + f(VI); + // CHECK: call void @_Z1fIiEv6vectorIT_5allocIS1_EE( + + Vec VD; + g(VD); + // CHECK: call void @_Z1gI6vectorId5allocIdEEEvT_( + + h(VI); + // CHECK: call void @_Z1hI3VecEvT_IiE( + + Alloc AC; + h(AC); + // CHECK: call void @_Z1hI5allocEvT_IiE( + + h(AC); + // CHECK: call void @_Z1hI5AllocEvT_IiE( + + Vec VC; + g>(VC); + // CHECK: call void @_Z1gI6vectorIc5allocIcEEEvT_( + + Vec> VVI; + g(VVI); + // CHECK: call void @_Z1gI6vectorIS0_Ii5allocIiEES1_IS3_EEEvT_( + + // CHECK: call void @_Z1hIJidEEv1UIDpT_ES2_ + h({}, 0, 0.0); +} -- cgit v1.2.3