Skip to content

Commit acd4cb1

Browse files
committed
[ASTContext] Remove unused function and includes
1 parent 502f530 commit acd4cb1

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
@@ -856,10 +856,6 @@ class ASTContext final {
856856
return getIdentifier(getSwiftName(kind));
857857
}
858858

859-
/// Collect visible clang modules from the ClangModuleLoader. These modules are
860-
/// not necessarily loaded.
861-
void getVisibleTopLevelClangModules(SmallVectorImpl<clang::Module*> &Modules) const;
862-
863859
/// Populate \p names with visible top level module names.
864860
/// This guarantees that resulted \p names doesn't have duplicated names.
865861
void getVisibleTopLevelModuleNames(SmallVectorImpl<Identifier> &names) const;

lib/AST/ASTContext.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@
4747
#include "swift/Syntax/SyntaxArena.h"
4848
#include "swift/Strings.h"
4949
#include "swift/Subsystems.h"
50-
#include "clang/AST/Attr.h"
51-
#include "clang/AST/DeclObjC.h"
52-
#include "clang/Lex/HeaderSearch.h"
53-
#include "clang/Lex/Preprocessor.h"
5450
#include "llvm/ADT/DenseMap.h"
5551
#include "llvm/ADT/Statistic.h"
5652
#include "llvm/ADT/StringMap.h"
@@ -1423,12 +1419,6 @@ ModuleDecl *ASTContext::getLoadedModule(Identifier ModuleName) const {
14231419
return LoadedModules.lookup(ModuleName);
14241420
}
14251421

1426-
void ASTContext::getVisibleTopLevelClangModules(
1427-
SmallVectorImpl<clang::Module*> &Modules) const {
1428-
getClangModuleLoader()->getClangPreprocessor().getHeaderSearchInfo().
1429-
collectAllModules(Modules);
1430-
}
1431-
14321422
static AllocationArena getArena(GenericSignature *genericSig) {
14331423
if (!genericSig)
14341424
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)