diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-08-22 04:22:50 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-08-22 04:22:50 +0000 |
commit | 118da50a2aa6eb6464cf39e81b165f171fa13802 (patch) | |
tree | e026825ecfc6005576d14deaa7ab699af82a4dce /clang/include/clang/AST/MangleNumberingContext.h | |
parent | 05a09c67da39911785aba17cb24db99801eccc5a (diff) | |
download | bcm5719-llvm-118da50a2aa6eb6464cf39e81b165f171fa13802.tar.gz bcm5719-llvm-118da50a2aa6eb6464cf39e81b165f171fa13802.zip |
MS ABI: Don't use the Itanium scheme for numbering lambdas
The Itanium ABI will give out the same mangling number for two different
lambdas if their call operators have different types. The MS ABI cannot
do the same because it does not mangle the return type into it's
lambdas.
This fixes PR20719.
llvm-svn: 216259
Diffstat (limited to 'clang/include/clang/AST/MangleNumberingContext.h')
-rw-r--r-- | clang/include/clang/AST/MangleNumberingContext.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/clang/include/clang/AST/MangleNumberingContext.h b/clang/include/clang/AST/MangleNumberingContext.h index 56aec73f245..7a818557fdb 100644 --- a/clang/include/clang/AST/MangleNumberingContext.h +++ b/clang/include/clang/AST/MangleNumberingContext.h @@ -30,23 +30,20 @@ class VarDecl; /// \brief Keeps track of the mangled names of lambda expressions and block /// literals within a particular context. -class MangleNumberingContext - : public RefCountedBase<MangleNumberingContext> { - llvm::DenseMap<const Type *, unsigned> ManglingNumbers; - +class MangleNumberingContext : public RefCountedBase<MangleNumberingContext> { public: virtual ~MangleNumberingContext() {} /// \brief Retrieve the mangling number of a new lambda expression with the /// given call operator within this context. - unsigned getManglingNumber(const CXXMethodDecl *CallOperator); + virtual unsigned getManglingNumber(const CXXMethodDecl *CallOperator) = 0; /// \brief Retrieve the mangling number of a new block literal within this /// context. - unsigned getManglingNumber(const BlockDecl *BD); + virtual unsigned getManglingNumber(const BlockDecl *BD) = 0; /// Static locals are numbered by source order. - unsigned getStaticLocalNumber(const VarDecl *VD); + virtual unsigned getStaticLocalNumber(const VarDecl *VD) = 0; /// \brief Retrieve the mangling number of a static local variable within /// this context. @@ -58,6 +55,6 @@ public: virtual unsigned getManglingNumber(const TagDecl *TD, unsigned MSLocalManglingNumber) = 0; }; - + } // end namespace clang #endif |