| 52 | |
| 53 | |
| 54 | struct ProjectManager { |
| 55 | explicit ProjectManager(std::string outputPrefix, std::string _dataPath) |
| 56 | : outputPrefix(std::move(outputPrefix)) , dataPath(std::move(_dataPath)) |
| 57 | { |
| 58 | if (dataPath.empty()) |
| 59 | dataPath = "../data"; |
| 60 | } |
| 61 | |
| 62 | void addProject(ProjectInfo info); |
| 63 | |
| 64 | std::vector<ProjectInfo> projects = |
| 65 | { {"include", "/usr/include/", ProjectInfo::Internal } }; |
| 66 | |
| 67 | std::string outputPrefix; |
| 68 | std::string dataPath; |
| 69 | |
| 70 | // the file name need to be canonicalized |
| 71 | ProjectInfo *projectForFile(llvm::StringRef filename); // don't keep a cache |
| 72 | |
| 73 | // return true if the filename should be proesseded. |
| 74 | // 'project' is the value returned by projectForFile |
| 75 | bool shouldProcess(llvm::StringRef filename, ProjectInfo *project); |
| 76 | |
| 77 | std::string includeRecovery(llvm::StringRef includeName, llvm::StringRef from); |
| 78 | |
| 79 | private: |
| 80 | std::unordered_multimap<std::string, std::string> includeRecoveryCache; |
| 81 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected