(context: ResolutionContext)
| 120 | |
| 121 | /** Every `#include` of the project, by its import node, as the indexed file it names (ProjectScans). */ |
| 122 | export function cppIncludeTargets(context: ResolutionContext): Map<string, string | null> { |
| 123 | const memo = memoFor(context); |
| 124 | const byName = includesByName(context, memo); |
| 125 | let count = 0; |
| 126 | for (const includes of byName.values()) count += includes.length; |
| 127 | if (count > INCLUDES_READ_UP_FRONT) return memo.targets; |
| 128 | for (const includes of byName.values()) { |
| 129 | for (const include of includes) includedFile(include, context, memo); |
| 130 | } |
| 131 | return memo.targets; |
| 132 | } |
| 133 | |
| 134 | export function adoptCppIncludeTargets(context: ResolutionContext, targets: Map<string, string | null>): void { |
| 135 | memoFor(context).targets = targets; |
no test coverage detected