@@ -77,6 +77,7 @@ class ASTMangler : public Mangler {
7777public:
7878 enum class SymbolKind {
7979 Default,
80+ AsyncHandlerBody,
8081 DynamicThunk,
8182 SwiftAsObjCThunk,
8283 ObjCAsSwiftThunk,
@@ -323,16 +324,24 @@ class ASTMangler : public Mangler {
323324
324325 void appendAnyGenericType (const GenericTypeDecl *decl);
325326
326- void appendFunction (AnyFunctionType *fn, bool isFunctionMangling = false ,
327- const ValueDecl *forDecl = nullptr );
327+ enum FunctionManglingKind {
328+ NoFunctionMangling,
329+ FunctionMangling,
330+ AsyncHandlerBodyMangling
331+ };
332+
333+ void appendFunction (AnyFunctionType *fn,
334+ FunctionManglingKind functionMangling = NoFunctionMangling,
335+ const ValueDecl *forDecl = nullptr );
328336 void appendFunctionType (AnyFunctionType *fn, bool isAutoClosure = false ,
329337 const ValueDecl *forDecl = nullptr );
330338 void appendClangType (AnyFunctionType *fn);
331339 template <typename FnType>
332340 void appendClangType (FnType *fn, llvm::raw_svector_ostream &os);
333341
334342 void appendFunctionSignature (AnyFunctionType *fn,
335- const ValueDecl *forDecl = nullptr );
343+ const ValueDecl *forDecl,
344+ FunctionManglingKind functionMangling);
336345
337346 void appendFunctionInputType (ArrayRef<AnyFunctionType::Param> params,
338347 const ValueDecl *forDecl = nullptr );
@@ -383,7 +392,10 @@ class ASTMangler : public Mangler {
383392 GenericSignature &genericSig,
384393 GenericSignature &parentGenericSig);
385394
386- void appendDeclType (const ValueDecl *decl, bool isFunctionMangling = false );
395+
396+
397+ void appendDeclType (const ValueDecl *decl,
398+ FunctionManglingKind functionMangling = NoFunctionMangling);
387399
388400 bool tryAppendStandardSubstitution (const GenericTypeDecl *type);
389401
@@ -400,7 +412,7 @@ class ASTMangler : public Mangler {
400412
401413 void appendEntity (const ValueDecl *decl, StringRef EntityOp, bool isStatic);
402414
403- void appendEntity (const ValueDecl *decl);
415+ void appendEntity (const ValueDecl *decl, bool isAsyncHandlerBody = false );
404416
405417 void appendProtocolConformance (const ProtocolConformance *conformance);
406418 void appendProtocolConformanceRef (const RootProtocolConformance *conformance);
0 commit comments