Skip to content

Commit e106551

Browse files
committed
[NFC][interop] rename the PrintAsObjC library to PrintAsClang
We're starting to support emission of C++ header interfaces, so a language-agnostic name makes more sense
1 parent 7aa1cd1 commit e106551

19 files changed

+35
-35
lines changed

CODE_OWNERS.TXT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ D: Debug info
7575
N: Jordan Rose
7676
7777
G: jrose-apple
78-
D: ClangImporter, Serialization, PrintAsObjC, Driver, Frontend
78+
D: ClangImporter, Serialization, PrintAsClang, Driver, Frontend
7979

8080
N: Daniel Steffen
8181

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ documentation, please create a thread on the Swift forums under the
102102
- [DependencyAnalysis.md](/docs/DependencyAnalysis.md):
103103
Describes different kinds of dependencies across files in the same module,
104104
important for understanding incremental builds.
105-
- C and ObjC interoperability: Clang Importer and PrintAsObjC
105+
- C and ObjC interoperability: Clang Importer and PrintAsClang
106106
- [CToSwiftNameTranslation.md](/docs/CToSwiftNameTranslation.md):
107107
Describes how C and ObjC entities are imported into Swift
108108
by the Clang Importer.

include/swift/AST/TypeNodes.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
/// process does not necessarily converge to the canonical type, however.
3434
/// The default behavior is TYPE(id, parent).
3535
//
36-
// If you add a new sugared type, be sure to test it in PrintAsObjC!
36+
// If you add a new sugared type, be sure to test it in PrintAsClang!
3737

3838
/// UNCHECKED_TYPE(id, parent)
3939
/// This type is not present in valid, type-checked programs.

include/swift/PrintAsObjC/PrintAsObjC.h renamed to include/swift/PrintAsClang/PrintAsClang.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- PrintAsObjC.h - Emit a header file for a Swift AST -----*- C++ -*-===//
1+
//===--- PrintAsClang.h - Emit a header file for a Swift AST ----*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//
@@ -10,8 +10,8 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#ifndef SWIFT_PRINTASOBJC_H
14-
#define SWIFT_PRINTASOBJC_H
13+
#ifndef SWIFT_PRINTASCLANG_H
14+
#define SWIFT_PRINTASCLANG_H
1515

1616
#include "swift/Basic/LLVM.h"
1717
#include "swift/AST/AttrKind.h"

lib/AST/SwiftNameTranslation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ getErrorDomainStringForObjC(const EnumDecl *ED) {
6464
for (const NominalTypeDecl * D = ED;
6565
D != nullptr;
6666
D = D->getDeclContext()->getSelfNominalTypeDecl()) {
67-
// We don't currently PrintAsObjC any types whose parents are private or
67+
// We don't currently PrintAsClang any types whose parents are private or
6868
// fileprivate.
6969
assert(D->getFormalAccess() >= AccessLevel::Internal &&
7070
"We don't currently append private discriminators");

lib/AST/Type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2630,7 +2630,7 @@ getObjCObjectRepresentable(Type type, const DeclContext *dc) {
26302630
///
26312631
/// This function determines when and how a particular type is mapped
26322632
/// into a foreign language. Any changes to the logic here also need
2633-
/// to be reflected in PrintAsObjC, so that the Swift type will be
2633+
/// to be reflected in PrintAsClang, so that the Swift type will be
26342634
/// properly printed for (Objective-)C and in SIL's bridging logic.
26352635
static std::pair<ForeignRepresentableKind, ProtocolConformance *>
26362636
getForeignRepresentable(Type type, ForeignLanguage language,

lib/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ add_subdirectory(Markup)
3535
add_subdirectory(Migrator)
3636
add_subdirectory(Option)
3737
add_subdirectory(Parse)
38-
add_subdirectory(PrintAsObjC)
38+
add_subdirectory(PrintAsClang)
3939
add_subdirectory(RemoteAST)
4040
add_subdirectory(Sema)
4141
add_subdirectory(Serialization)

lib/ClangImporter/ImportDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3093,7 +3093,7 @@ namespace {
30933093
if (!result)
30943094
return nullptr;
30953095

3096-
// HACK: Make sure PrintAsObjC always omits the 'enum' tag for
3096+
// HACK: Make sure PrintAsClang always omits the 'enum' tag for
30973097
// option set enums.
30983098
Impl.DeclsWithSuperfluousTypedefs.insert(decl);
30993099
break;

lib/FrontendTool/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ target_link_libraries(swiftFrontendTool PRIVATE
2121
swiftIndex
2222
swiftIRGen
2323
swiftOption
24-
swiftPrintAsObjC
24+
swiftPrintAsClang
2525
swiftSerialization
2626
swiftSIL
2727
swiftSILGen

lib/FrontendTool/FrontendTool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
#include "swift/Option/Options.h"
6363
#include "swift/Migrator/FixitFilter.h"
6464
#include "swift/Migrator/Migrator.h"
65-
#include "swift/PrintAsObjC/PrintAsObjC.h"
65+
#include "swift/PrintAsClang/PrintAsClang.h"
6666
#include "swift/Serialization/SerializationOptions.h"
6767
#include "swift/Serialization/SerializedModuleLoader.h"
6868
#include "swift/SILOptimizer/PassManager/Passes.h"

0 commit comments

Comments
 (0)