@@ -77,6 +77,7 @@ class ASTMangler : public Mangler {
77
77
public:
78
78
enum class SymbolKind {
79
79
Default,
80
+ AsyncHandlerBody,
80
81
DynamicThunk,
81
82
SwiftAsObjCThunk,
82
83
ObjCAsSwiftThunk,
@@ -323,16 +324,24 @@ class ASTMangler : public Mangler {
323
324
324
325
void appendAnyGenericType (const GenericTypeDecl *decl);
325
326
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 );
328
336
void appendFunctionType (AnyFunctionType *fn, bool isAutoClosure = false ,
329
337
const ValueDecl *forDecl = nullptr );
330
338
void appendClangType (AnyFunctionType *fn);
331
339
template <typename FnType>
332
340
void appendClangType (FnType *fn, llvm::raw_svector_ostream &os);
333
341
334
342
void appendFunctionSignature (AnyFunctionType *fn,
335
- const ValueDecl *forDecl = nullptr );
343
+ const ValueDecl *forDecl,
344
+ FunctionManglingKind functionMangling);
336
345
337
346
void appendFunctionInputType (ArrayRef<AnyFunctionType::Param> params,
338
347
const ValueDecl *forDecl = nullptr );
@@ -383,7 +392,10 @@ class ASTMangler : public Mangler {
383
392
GenericSignature &genericSig,
384
393
GenericSignature &parentGenericSig);
385
394
386
- void appendDeclType (const ValueDecl *decl, bool isFunctionMangling = false );
395
+
396
+
397
+ void appendDeclType (const ValueDecl *decl,
398
+ FunctionManglingKind functionMangling = NoFunctionMangling);
387
399
388
400
bool tryAppendStandardSubstitution (const GenericTypeDecl *type);
389
401
@@ -400,7 +412,7 @@ class ASTMangler : public Mangler {
400
412
401
413
void appendEntity (const ValueDecl *decl, StringRef EntityOp, bool isStatic);
402
414
403
- void appendEntity (const ValueDecl *decl);
415
+ void appendEntity (const ValueDecl *decl, bool isAsyncHandlerBody = false );
404
416
405
417
void appendProtocolConformance (const ProtocolConformance *conformance);
406
418
void appendProtocolConformanceRef (const RootProtocolConformance *conformance);
0 commit comments