2012-08-07 13:04:19 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
|
2012-08-07 08:14:25 +08:00
|
|
|
|
|
|
|
template<typename _CharT>
|
|
|
|
struct basic_string {
|
|
|
|
|
|
|
|
basic_string&
|
2013-01-21 12:37:12 +08:00
|
|
|
assign(const _CharT* __s, const basic_string<_CharT> &x)
|
2012-08-07 08:14:25 +08:00
|
|
|
{
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
void foo (const char *c) {
|
|
|
|
basic_string<char> str;
|
2013-01-21 12:37:12 +08:00
|
|
|
str.assign(c, str);
|
2012-08-07 08:14:25 +08:00
|
|
|
}
|
|
|
|
|
2013-08-30 07:19:58 +08:00
|
|
|
// CHECK: [[BS:.*]] = {{.*}} ; [ DW_TAG_structure_type ] [basic_string<char>] [line 4, size 8, align 8, offset 0] [def] [from ]
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: [[TYPE:![0-9]*]] = !{!"0x15\00{{.*}}"{{.*}}, [[ARGS:.*]], null, null, null} ; [ DW_TAG_subroutine_type ]
|
|
|
|
// CHECK: [[ARGS]] = !{!{{.*}}, !{{.*}}, [[P:![0-9]*]], [[R:.*]]}
|
|
|
|
// CHECK: [[P]] = {{.*}}, [[CON:![0-9]*]]} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from ]
|
|
|
|
// CHECK: [[CON]] = {{.*}}, [[CH:![0-9]*]]} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from char]
|
2013-03-20 07:10:14 +08:00
|
|
|
// CHECK: [[CH]] = {{.*}} ; [ DW_TAG_base_type ] [char] [line 0, size 8, align 8, offset 0, enc DW_ATE_signed_char]
|
|
|
|
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: [[R]] = {{.*}}, [[CON2:![0-9]*]]} ; [ DW_TAG_reference_type ] [line 0, size 0, align 0, offset 0] [from ]
|
|
|
|
// CHECK: [[CON2]] = {{.*}}, !"_ZTS12basic_stringIcE"} ; [ DW_TAG_const_type ] [line 0, size 0, align 0, offset 0] [from _ZTS12basic_stringIcE]
|
|
|
|
// CHECK: !"0x2e\00assign\00{{.*}}\008"{{, [^,]+, [^,]+}}, !8, {{.*}} ; [ DW_TAG_subprogram ] [line 7] [def] [scope 8] [assign]
|