summaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/ASTContext.h5
-rw-r--r--include/clang/Sema/Sema.h14
2 files changed, 6 insertions, 13 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index 5105b9c35c..7547960b09 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -514,6 +514,8 @@ private:
/// need to be consistently numbered for the mangler).
llvm::DenseMap<const DeclContext *, std::unique_ptr<MangleNumberingContext>>
MangleNumberingContexts;
+ llvm::DenseMap<const Decl *, std::unique_ptr<MangleNumberingContext>>
+ ExtraMangleNumberingContexts;
/// Side-table of mangling numbers for declarations which rarely
/// need them (like static local vars).
@@ -2812,6 +2814,9 @@ public:
/// Retrieve the context for computing mangling numbers in the given
/// DeclContext.
MangleNumberingContext &getManglingNumberContext(const DeclContext *DC);
+ enum NeedExtraManglingDecl_t { NeedExtraManglingDecl };
+ MangleNumberingContext &getManglingNumberContext(NeedExtraManglingDecl_t,
+ const Decl *D);
std::unique_ptr<MangleNumberingContext> createMangleNumberingContext() const;
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index c9211eb700..2fb3e32e1b 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -1045,13 +1045,6 @@ public:
/// suffice, e.g., in a default function argument.
Decl *ManglingContextDecl;
- /// The context information used to mangle lambda expressions
- /// and block literals within this context.
- ///
- /// This mangling information is allocated lazily, since most contexts
- /// do not have lambda expressions or block literals.
- std::unique_ptr<MangleNumberingContext> MangleNumbering;
-
/// If we are processing a decltype type, a set of call expressions
/// for which we have deferred checking the completeness of the return type.
SmallVector<CallExpr *, 8> DelayedDecltypeCalls;
@@ -1080,12 +1073,7 @@ public:
ExpressionKind ExprContext)
: Context(Context), ParentCleanup(ParentCleanup),
NumCleanupObjects(NumCleanupObjects), NumTypos(0),
- ManglingContextDecl(ManglingContextDecl), MangleNumbering(),
- ExprContext(ExprContext) {}
-
- /// Retrieve the mangling numbering context, used to consistently
- /// number constructs like lambdas for mangling.
- MangleNumberingContext &getMangleNumberingContext(ASTContext &Ctx);
+ ManglingContextDecl(ManglingContextDecl), ExprContext(ExprContext) {}
bool isUnevaluated() const {
return Context == ExpressionEvaluationContext::Unevaluated ||