Skip to content

Commit b78a39b

Browse files
committed
[ASTContext] Remove unused function and includes
(cherry picked from commit acd4cb1)
1 parent a7b43ce commit b78a39b

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

include/swift/AST/ASTContext.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,10 +892,6 @@ class ASTContext final {
892892
return getIdentifier(getSwiftName(kind));
893893
}
894894

895-
/// Collect visible clang modules from the ClangModuleLoader. These modules are
896-
/// not necessarily loaded.
897-
void getVisibleTopLevelClangModules(SmallVectorImpl<clang::Module*> &Modules) const;
898-
899895
/// Populate \p names with visible top level module names.
900896
/// This guarantees that resulted \p names doesn't have duplicated names.
901897
void getVisibleTopLevelModuleNames(SmallVectorImpl<Identifier> &names) const;

lib/AST/ASTContext.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@
4646
#include "swift/Syntax/SyntaxArena.h"
4747
#include "swift/Strings.h"
4848
#include "swift/Subsystems.h"
49-
#include "clang/AST/Attr.h"
50-
#include "clang/AST/DeclObjC.h"
51-
#include "clang/Lex/HeaderSearch.h"
52-
#include "clang/Lex/Preprocessor.h"
5349
#include "llvm/ADT/DenseMap.h"
5450
#include "llvm/ADT/Statistic.h"
5551
#include "llvm/ADT/StringMap.h"
@@ -1502,12 +1498,6 @@ ModuleDecl *ASTContext::getLoadedModule(Identifier ModuleName) const {
15021498
return LoadedModules.lookup(ModuleName);
15031499
}
15041500

1505-
void ASTContext::getVisibleTopLevelClangModules(
1506-
SmallVectorImpl<clang::Module*> &Modules) const {
1507-
getClangModuleLoader()->getClangPreprocessor().getHeaderSearchInfo().
1508-
collectAllModules(Modules);
1509-
}
1510-
15111501
static AllocationArena getArena(GenericSignature *genericSig) {
15121502
if (!genericSig)
15131503
return AllocationArena::Permanent;

lib/Serialization/SerializedModuleLoader.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ Optional<bool> forEachModuleSearchPath(
7272
return result;
7373

7474
// Apple platforms have extra implicit framework search paths:
75-
// $SDKROOT/System/Library/Frameworks/ ; and
76-
// $SDKROOT/Library/Frameworks/
75+
// $SDKROOT/System/Library/Frameworks/ and $SDKROOT/Library/Frameworks/.
7776
if (Ctx.LangOpts.Target.isOSDarwin()) {
7877
SmallString<128> scratch;
7978
scratch = Ctx.SearchPathOpts.SDKPath;
@@ -154,7 +153,7 @@ void SerializedModuleLoaderBase::collectVisibleTopLevelModuleNamesImpl(
154153
switch (Kind) {
155154
case SearchPathKind::Import: {
156155
// Look for:
157-
// $PATH/{name}.swiftmodule/{arch}.{extension} ; Or
156+
// $PATH/{name}.swiftmodule/{arch}.{extension} or
158157
// $PATH/{name}.{extension}
159158
forEachDirectoryEntryPath(searchPath, [&](StringRef path) {
160159
auto pathExt = llvm::sys::path::extension(path);

0 commit comments

Comments
 (0)