@@ -166,23 +166,23 @@ class ASTMangler : public Mangler {
166
166
bool predefined);
167
167
168
168
// / Mangle the derivative function (JVP/VJP) for the given:
169
- // / - Mangled original function name .
169
+ // / - Mangled original function declaration .
170
170
// / - Derivative function kind.
171
171
// / - Derivative function configuration: parameter/result indices and
172
172
// / derivative generic signature.
173
173
std::string
174
- mangleAutoDiffDerivativeFunctionHelper (StringRef name ,
175
- AutoDiffDerivativeFunctionKind kind,
176
- AutoDiffConfig config);
174
+ mangleAutoDiffDerivativeFunction ( const AbstractFunctionDecl *originalAFD ,
175
+ AutoDiffDerivativeFunctionKind kind,
176
+ AutoDiffConfig config);
177
177
178
178
// / Mangle the linear map (differential/pullback) for the given:
179
- // / - Mangled original function name .
179
+ // / - Mangled original function declaration .
180
180
// / - Linear map kind.
181
181
// / - Derivative function configuration: parameter/result indices and
182
182
// / derivative generic signature.
183
- std::string mangleAutoDiffLinearMapHelper (StringRef name ,
184
- AutoDiffLinearMapKind kind,
185
- AutoDiffConfig config);
183
+ std::string mangleAutoDiffLinearMap ( const AbstractFunctionDecl *originalAFD ,
184
+ AutoDiffLinearMapKind kind,
185
+ AutoDiffConfig config);
186
186
187
187
// / Mangle the AutoDiff generated declaration for the given:
188
188
// / - Generated declaration kind: linear map struct or branching trace enum.
@@ -255,6 +255,8 @@ class ASTMangler : public Mangler {
255
255
256
256
std::string mangleOpaqueTypeDecl (const ValueDecl *decl);
257
257
258
+ std::string mangleGenericSignature (const GenericSignature sig);
259
+
258
260
enum SpecialContext {
259
261
ObjCContext,
260
262
ClangImporterContext,
@@ -427,6 +429,12 @@ class ASTMangler : public Mangler {
427
429
void appendSymbolicReference (SymbolicReferent referent);
428
430
429
431
void appendOpaqueDeclName (const OpaqueTypeDecl *opaqueDecl);
432
+
433
+ void beginManglingWithAutoDiffOriginalFunction (
434
+ const AbstractFunctionDecl *afd);
435
+ void appendAutoDiffFunctionParts (char functionKindCode,
436
+ AutoDiffConfig config);
437
+ void appendIndexSubset (IndexSubset *indexSubset);
430
438
};
431
439
432
440
} // end namespace Mangle
0 commit comments