[ASTGen] Move regex literal parsing from SwiftCompilerSources to ASTGen

ASTGen always builds with the host Swift compiler, without requiring
bootstrapping, and is enabled in more places. Move the regex literal
parsing logic there so it is enabled in more host environments, and
makes use of CMake's Swift support. Enable all of the regex literal
tests when ASTGen is built, to ensure everything is working.

Remove the "AST" and "Parse" Swift modules from SwiftCompilerSources,
because they are no longer needed.
This commit is contained in:
Rintaro Ishizaki
2023-11-13 19:35:44 -08:00
parent 23effda44d
commit 47f18d492e
49 changed files with 144 additions and 331 deletions

View File

@@ -14,7 +14,6 @@
//
//===----------------------------------------------------------------------===//
#include "swift/Basic/InitializeSwiftModules.h"
#include "swift/Basic/LLVMInitialize.h"
#include "swift/DependencyScan/DependencyScanImpl.h"
#include "swift/DependencyScan/DependencyScanningTool.h"
@@ -131,9 +130,6 @@ void swiftscan_scanner_cache_reset(swiftscan_scanner_t scanner) {
swiftscan_scanner_t swiftscan_scanner_create(void) {
INITIALIZE_LLVM();
// We must initialize the swift modules responsible for parsing functionality,
// such as parsing regex.
initializeSwiftParseModules();
return wrap(new DependencyScanningTool());
}