Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/PrintAsClang/DeclAndTypePrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ class DeclAndTypePrinter::Implementation
}
os << "\n";
if (representation.isObjCxxOnly())
os << "#endif\n";
os << "#endif // defined(__OBJC__)\n";
return representation;
}

Expand Down Expand Up @@ -1684,7 +1684,7 @@ class DeclAndTypePrinter::Implementation
FD->getParameters(), funcTy->isThrowing(), funcTy);
os << "}\n";
if (result.isObjCxxOnly())
os << "#endif\n";
os << "#endif // defined(__OBJC__)\n";
}

enum class PrintLeadingSpace : bool {
Expand Down
2 changes: 1 addition & 1 deletion lib/PrintAsClang/PrintAsClang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void emitObjCConditional(raw_ostream &out,
out << "#else\n";
nonObjCCase();
}
out << "#endif\n";
out << "#endif // defined(__OBJC__)\n";
}

static void emitExternC(raw_ostream &out,
Expand Down
4 changes: 2 additions & 2 deletions lib/PrintAsClang/PrintClangFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,7 @@ void DeclAndTypeClangFunctionPrinter::printCxxMethod(
if (!isDefinition) {
os << ";\n";
if (result.isObjCxxOnly())
os << "#endif\n";
os << "#endif // defined(__OBJC__)\n";
return;
}

Expand All @@ -1699,7 +1699,7 @@ void DeclAndTypeClangFunctionPrinter::printCxxMethod(
dispatchInfo);
os << " }\n";
if (result.isObjCxxOnly())
os << "#endif\n";
os << "#endif // defined(__OBJC__)\n";
}

/// Returns true if the given property name like `isEmpty` can be remapped
Expand Down
2 changes: 1 addition & 1 deletion lib/PrintAsClang/PrintClangValueType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ void ClangValueTypePrinter::printTypeGenericTraits(
os << "} // namespace\n";
os << "#pragma clang diagnostic pop\n";
if (objCxxOnly)
os << "#endif // #if defined(__OBJC__)\n";
os << "#endif // defined(__OBJC__)\n";
os << "} // namespace swift\n";
os << "\n";
printer.printModuleNamespaceStart(*moduleContext);
Expand Down
2 changes: 1 addition & 1 deletion test/PrintAsObjC/Inputs/comments-expected-output.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ SWIFT_CLASS("_TtC8comments13UnorderedList")
- (void)f0;
@end

#endif
#endif // defined(__OBJC__)
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
Expand Down