From 519fc96c475680de2cc49e7811dbbfadb912cbcc Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 23 Oct 2019 17:52:09 +0000 Subject: Vendor import of stripped clang trunk r375505, the last commit before the upstream Subversion repository was made read-only, and the LLVM project migrated to GitHub: https://llvm.org/svn/llvm-project/cfe/trunk@375505 --- include/clang/AST/Mangle.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'include/clang/AST/Mangle.h') diff --git a/include/clang/AST/Mangle.h b/include/clang/AST/Mangle.h index b1fbe936136a9..5db5c5b977da5 100644 --- a/include/clang/AST/Mangle.h +++ b/include/clang/AST/Mangle.h @@ -56,7 +56,7 @@ private: llvm::DenseMap GlobalBlockIds; llvm::DenseMap LocalBlockIds; - llvm::DenseMap AnonStructIds; + llvm::DenseMap AnonStructIds; public: ManglerKind getKind() const { return Kind; } @@ -82,9 +82,9 @@ public: return Result.first->second; } - uint64_t getAnonymousStructId(const TagDecl *TD) { - std::pair::iterator, bool> - Result = AnonStructIds.insert(std::make_pair(TD, AnonStructIds.size())); + uint64_t getAnonymousStructId(const NamedDecl *D) { + std::pair::iterator, bool> + Result = AnonStructIds.insert(std::make_pair(D, AnonStructIds.size())); return Result.first->second; } @@ -170,6 +170,8 @@ public: virtual void mangleCXXDtorComdat(const CXXDestructorDecl *D, raw_ostream &) = 0; + virtual void mangleLambdaSig(const CXXRecordDecl *Lambda, raw_ostream &) = 0; + static bool classof(const MangleContext *C) { return C->getKind() == MK_Itanium; } @@ -248,8 +250,16 @@ class ASTNameGenerator { public: explicit ASTNameGenerator(ASTContext &Ctx); ~ASTNameGenerator(); + + /// Writes name for \p D to \p OS. + /// \returns true on failure, false on success. bool writeName(const Decl *D, raw_ostream &OS); + + /// \returns name for \p D std::string getName(const Decl *D); + + /// \returns all applicable mangled names. + /// For example C++ constructors/destructors can have multiple. std::vector getAllManglings(const Decl *D); private: -- cgit v1.2.3