@@ -220,6 +220,10 @@ void DeclAndTypeClangFunctionPrinter::printFunctionSignature(
220
220
}
221
221
};
222
222
223
+ // Print any modifiers before the signature.
224
+ if (modifiers.isInline )
225
+ os << " inline " ;
226
+
223
227
// Print out the return type.
224
228
bool isIndirectReturnType =
225
229
kind == FunctionSignatureKind::CFunctionProto &&
@@ -467,11 +471,12 @@ void DeclAndTypeClangFunctionPrinter::printCxxMethod(
467
471
os << " " ;
468
472
if (isConstructor && !isDefinition)
469
473
os << " static " ;
470
- os << " inline " ;
474
+
471
475
// FIXME: Full qualifier.
472
476
FunctionSignatureModifiers modifiers;
473
477
if (isDefinition)
474
478
modifiers.qualifierContext = typeDeclContext;
479
+ modifiers.isInline = true ;
475
480
bool isMutating =
476
481
isa<FuncDecl>(FD) ? cast<FuncDecl>(FD)->isMutating () : false ;
477
482
modifiers.isConst = !isMutating && !isConstructor;
@@ -501,7 +506,7 @@ void DeclAndTypeClangFunctionPrinter::printCxxPropertyAccessorMethod(
501
506
const NominalTypeDecl *typeDeclContext, const AccessorDecl *accessor,
502
507
StringRef swiftSymbolName, Type resultTy, bool isDefinition) {
503
508
assert (accessor->isSetter () || accessor->getParameters ()->size () == 0 );
504
- os << " inline " ;
509
+ os << " " ;
505
510
506
511
StringRef propertyName;
507
512
// For a getter or setter, go through the variable or subscript decl.
@@ -516,6 +521,7 @@ void DeclAndTypeClangFunctionPrinter::printCxxPropertyAccessorMethod(
516
521
FunctionSignatureModifiers modifiers;
517
522
if (isDefinition)
518
523
modifiers.qualifierContext = typeDeclContext;
524
+ modifiers.isInline = true ;
519
525
modifiers.isConst = accessor->isGetter ();
520
526
printFunctionSignature (accessor, nameOS.str (), resultTy,
521
527
FunctionSignatureKind::CxxInlineThunk, {}, modifiers);
0 commit comments