mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #85439 from egorzhdan/egorzhdan/endif-objc
[cxx-interop] Emit `#endif // defined(__OBJC__)` with the comment consistently
This commit is contained in:
@@ -1574,7 +1574,7 @@ private:
|
||||
}
|
||||
os << "\n";
|
||||
if (representation.isObjCxxOnly())
|
||||
os << "#endif\n";
|
||||
os << "#endif // defined(__OBJC__)\n";
|
||||
return representation;
|
||||
}
|
||||
|
||||
@@ -1684,7 +1684,7 @@ private:
|
||||
FD->getParameters(), funcTy->isThrowing(), funcTy);
|
||||
os << "}\n";
|
||||
if (result.isObjCxxOnly())
|
||||
os << "#endif\n";
|
||||
os << "#endif // defined(__OBJC__)\n";
|
||||
}
|
||||
|
||||
enum class PrintLeadingSpace : bool {
|
||||
|
||||
@@ -56,7 +56,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,
|
||||
|
||||
@@ -1686,7 +1686,7 @@ void DeclAndTypeClangFunctionPrinter::printCxxMethod(
|
||||
if (!isDefinition) {
|
||||
os << ";\n";
|
||||
if (result.isObjCxxOnly())
|
||||
os << "#endif\n";
|
||||
os << "#endif // defined(__OBJC__)\n";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user