diff options
author | John McCall <rjmccall@apple.com> | 2011-04-24 08:23:24 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-04-24 08:23:24 +0000 |
commit | a0ce15c13a69c430d8980a1fcf03f420855c18ca (patch) | |
tree | c6ba4531450e5551b12e3554c777fa9428fce4f8 /test/CodeGenCXX/mangle.cpp | |
parent | 312eadb832cab4497a069409954500d8192b8f0d (diff) |
Update the mangler for some of the "new" unresolved-name manglings.
I've sent off an email requesting clarification on a few things that
I wasn't sure how to handle.
This also necessitated making prefixes and unresolved-prefixes get
mangled separately.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp index 54fb6a3ade..2e1229c2cc 100644 --- a/test/CodeGenCXX/mangle.cpp +++ b/test/CodeGenCXX/mangle.cpp @@ -390,26 +390,29 @@ namespace test2 { // CHECK: define linkonce_odr i32 @_ZN5test211read_memberINS_1AEEEDtptcvPT_Li0E6memberERS2_( } +// rdar://problem/9280586 namespace test3 { struct AmbiguousBase { int ab; }; struct Path1 : AmbiguousBase { float p; }; struct Path2 : AmbiguousBase { double p; }; struct Derived : Path1, Path2 { }; - //template <class T> decltype(((T*) 0)->Path1::ab) get_ab_1(T &ref) { return ref.Path1::ab; } - //template <class T> decltype(((T*) 0)->Path2::ab) get_ab_2(T &ref) { return ref.Path2::ab; } + // CHECK: define linkonce_odr i32 @_ZN5test38get_ab_1INS_7DerivedEEEDtptcvPT_Li0EsrNS_5Path1E2abERS2_( + template <class T> decltype(((T*) 0)->Path1::ab) get_ab_1(T &ref) { return ref.Path1::ab; } - // define weak_odr float @_ZN5test37get_p_1INS_7DerivedEEEDtptcvPT_Li0E5Path11pERS2_( + // CHECK: define linkonce_odr i32 @_ZN5test38get_ab_2INS_7DerivedEEEDtptcvPT_Li0EsrNS_5Path2E2abERS2_( + template <class T> decltype(((T*) 0)->Path2::ab) get_ab_2(T &ref) { return ref.Path2::ab; } + + // CHECK: define linkonce_odr float @_ZN5test37get_p_1INS_7DerivedEEEDtptcvPT_Li0EsrNS_5Path1E1pERS2_( template <class T> decltype(((T*) 0)->Path1::p) get_p_1(T &ref) { return ref.Path1::p; } - // define weak_odr double @_ZN5test37get_p_1INS_7DerivedEEEDtptcvPT_Li0E5Path21pERS2_( + // CHECK: define linkonce_odr double @_ZN5test37get_p_2INS_7DerivedEEEDtptcvPT_Li0EsrNS_5Path2E1pERS2_( template <class T> decltype(((T*) 0)->Path2::p) get_p_2(T &ref) { return ref.Path2::p; } Derived obj; void test() { - // FIXME: uncomment these when we support diamonds competently - //get_ab_1(obj); - //get_ab_2(obj); + get_ab_1(obj); + get_ab_2(obj); get_p_1(obj); get_p_2(obj); } |