clang: include/clang/InstallAPI/DirectoryScanner.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12#ifndef LLVM_CLANG_INSTALLAPI_DIRECTORYSCANNER_H
13#define LLVM_CLANG_INSTALLAPI_DIRECTORYSCANNER_H
14
17
19
26
28public:
30 : FM(FM), Mode(Mode) {}
31
32
33
34
35 llvm::Error scan(StringRef Directory);
36
37
38 std::vector takeLibraries() { return std::move(Libraries); };
39
40
41
42
44
45private:
46
47 llvm::Error scanForUnwrappedLibraries(StringRef Directory);
48
49
50 llvm::Error scanForFrameworks(StringRef Directory);
51
52
53 Library &getOrCreateLibrary(StringRef Path, std::vector &Libs) const;
54
55
56 llvm::Error scanMultipleFrameworks(StringRef Directory,
57 std::vector &Libs) const;
58
59 llvm::Error scanSubFrameworksDirectory(StringRef Directory,
60 std::vector &Libs) const;
61
62
63 llvm::Error scanFrameworkDirectory(StringRef Path, Library &Framework) const;
64
65
67 StringRef BasePath,
68 StringRef ParentPath = StringRef()) const;
69
70
71 llvm::Error scanFrameworkVersionsDirectory(StringRef Path,
75 StringRef RootPath;
76 std::vector Libraries;
77};
78
79}
80
81#endif
Defines the clang::FileManager interface and associated types.
Implements support for file system lookup, file system caching, and directory search management.
The base class of the type hierarchy.
llvm::Error scan(StringRef Directory)
Scan for all input files throughout directory.
std::vector< Library > takeLibraries()
Take over ownership of stored libraries.
Definition DirectoryScanner.h:38
DirectoryScanner(FileManager &FM, ScanMode Mode=ScanMode::ScanFrameworks)
Definition DirectoryScanner.h:29
static HeaderSeq getHeaders(ArrayRef< Library > Libraries)
Get all the header files in libraries.
The DirectoryScanner for collecting library files on the file system.
ScanMode
Definition DirectoryScanner.h:20
@ ScanFrameworks
Scanning Framework directory.
Definition DirectoryScanner.h:22
@ ScanDylibs
Scanning Dylib directory.
Definition DirectoryScanner.h:24
std::vector< HeaderFile > HeaderSeq