[Dependency Scanning] Keep track of each imported module's access control

Adds an access control field for each imported module identified. When multiple imports of the same module are found, this keeps track of the most "open" access specifier.
This commit is contained in:
Artem Chikin
2025-06-10 16:05:54 -07:00
parent c24bae70e8
commit 6816922dd4
9 changed files with 105 additions and 70 deletions

View File

@@ -67,6 +67,9 @@ using IsExportedImport = BCFixed<1>;
using LineNumberField = BCFixed<32>;
using ColumnNumberField = BCFixed<32>;
/// Access level of an import
using AccessLevelField = BCFixed<8>;
/// Arrays of various identifiers, distinguished for readability
using IdentifierIDArryField = llvm::BCArray<IdentifierIDField>;
using ModuleIDArryField = llvm::BCArray<IdentifierIDField>;
@@ -192,7 +195,8 @@ using ImportStatementLayout =
LineNumberField, // lineNumber
ColumnNumberField, // columnNumber
IsOptionalImport, // isOptional
IsExportedImport // isExported
IsExportedImport, // isExported
AccessLevelField // accessLevel
>;
using ImportStatementArrayLayout =
BCRecordLayout<IMPORT_STATEMENT_ARRAY_NODE, IdentifierIDArryField>;