diff options
| author | Alex Lorenz <arphaman@gmail.com> | 2016-10-06 09:37:15 +0000 |
|---|---|---|
| committer | Alex Lorenz <arphaman@gmail.com> | 2016-10-06 09:37:15 +0000 |
| commit | 7ba609a220bb5755f018cd0740fefcffd8900725 (patch) | |
| tree | 47bdd7df5f400dd8124cdf70d5b4a87e87d7de16 | |
| parent | d3f5af0fe4e786621b9601b1efc4a21f11e52492 (diff) | |
| download | bcm5719-llvm-7ba609a220bb5755f018cd0740fefcffd8900725.tar.gz bcm5719-llvm-7ba609a220bb5755f018cd0740fefcffd8900725.zip | |
Fix PR30440: Initialize FunctionTypeDepth in CXXNameMangler
This commit fixes PR 30440 by initializing CXXNameMangler's FunctionTypeDepth
in the two constructors added in r274222 (The commit that caused this
regression).
rdar://28455269
Differential Revision: https://reviews.llvm.org/D24932
llvm-svn: 283428
| -rw-r--r-- | clang/lib/AST/ItaniumMangle.cpp | 8 | ||||
| -rw-r--r-- | clang/test/CodeGenCXX/mangle-abi-tag.cpp | 13 |
2 files changed, 17 insertions, 4 deletions
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index 95d8af96485..db0df363c0c 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -405,14 +405,14 @@ public: CXXNameMangler(CXXNameMangler &Outer, raw_ostream &Out_) : Context(Outer.Context), Out(Out_), NullOut(false), Structor(Outer.Structor), StructorType(Outer.StructorType), - SeqID(Outer.SeqID), AbiTagsRoot(AbiTags), - Substitutions(Outer.Substitutions) {} + SeqID(Outer.SeqID), FunctionTypeDepth(Outer.FunctionTypeDepth), + AbiTagsRoot(AbiTags), Substitutions(Outer.Substitutions) {} CXXNameMangler(CXXNameMangler &Outer, llvm::raw_null_ostream &Out_) : Context(Outer.Context), Out(Out_), NullOut(true), Structor(Outer.Structor), StructorType(Outer.StructorType), - SeqID(Outer.SeqID), AbiTagsRoot(AbiTags), - Substitutions(Outer.Substitutions) {} + SeqID(Outer.SeqID), FunctionTypeDepth(Outer.FunctionTypeDepth), + AbiTagsRoot(AbiTags), Substitutions(Outer.Substitutions) {} #if MANGLE_CHECKER ~CXXNameMangler() { diff --git a/clang/test/CodeGenCXX/mangle-abi-tag.cpp b/clang/test/CodeGenCXX/mangle-abi-tag.cpp index 990d2f94b5a..a653ff42228 100644 --- a/clang/test/CodeGenCXX/mangle-abi-tag.cpp +++ b/clang/test/CodeGenCXX/mangle-abi-tag.cpp @@ -219,3 +219,16 @@ void f19_test(N19::C<N19::A, &N19::foo>, N19::F, N19::D) { } // f19_test(N19::C<N19::A, &N19::foo[abi:B]>, N19::F, N19::D) // CHECK-DAG: define void @_Z8f19_testN3N191CINS_1AEXadL_ZNS_3fooB1BES1_NS_1DEEEEENS_1FES2_( + +namespace pr30440 { + +template<class F> void g(F); +template<class ...A> auto h(A ...a)->decltype (g (0, g < a > (a) ...)) { +} +// CHECK-DAG: define {{.*}} @_ZN7pr304401hIJEEEDTcl1gLi0Espcl1gIL_ZZNS_1hEDpT_E1aEEfp_EEES2_( + +void pr30440_test () { + h(); +} + +} |

