Swift: remove -frontend option as we don't need it yet

This commit is contained in:
Alex Denisov 2022-04-26 11:27:41 +02:00
Родитель 5fc4fab38e
Коммит 81e4f9165e
3 изменённых файлов: 2 добавлений и 12 удалений

Просмотреть файл

@ -82,12 +82,11 @@ void Extractor::extractFile(swift::SourceFile& file) {
return;
}
std::stringstream ss;
ss << "-frontend ";
for (auto opt : config.frontendOptions) {
ss << std::quoted(opt) << " ";
}
ss << "\n";
trap << "// frontend-options: " << ss.str();
trap << "// extractor-args: " << ss.str();
trap << "#0=*\n";
trap << "files(#0, " << std::quoted(srcFilePath.str().str()) << ")\n";

Просмотреть файл

@ -34,12 +34,6 @@ int main(int argc, char** argv) {
// TODO: print usage
return 1;
}
// The frontend can be called in different modes, we are only interested
// in -frontend mode
// TODO: filter out at the tracer level
if ("-frontend"s != argv[1]) {
return 0;
}
// Required by Swift/LLVM
PROGRAM_START(argc, argv);
INITIALIZE_LLVM();
@ -49,9 +43,6 @@ int main(int argc, char** argv) {
configuration.sourceArchiveDir = getenv_or("CODEQL_EXTRACTOR_SWIFT_SOURCE_ARCHIVE_DIR", ".");
std::vector<const char*> args;
for (int i = 1; i < argc; i++) {
if ("-frontend"s == argv[i]) {
continue;
}
args.push_back(argv[i]);
}
std::copy(std::begin(args), std::end(args), std::back_inserter(configuration.frontendOptions));

Просмотреть файл

@ -4,4 +4,4 @@ mkdir -p "$CODEQL_EXTRACTOR_SWIFT_TRAP_DIR"
QLTEST_LOG="$CODEQL_EXTRACTOR_SWIFT_LOG_DIR"/qltest.log
exec "$CODEQL_EXTRACTOR_SWIFT_ROOT/tools/$CODEQL_PLATFORM/extractor" -frontend -sdk "$CODEQL_EXTRACTOR_SWIFT_ROOT/qltest/$CODEQL_PLATFORM/sdk" -c *.swift >> $QLTEST_LOG 2>&1
exec "$CODEQL_EXTRACTOR_SWIFT_ROOT/tools/$CODEQL_PLATFORM/extractor" -sdk "$CODEQL_EXTRACTOR_SWIFT_ROOT/qltest/$CODEQL_PLATFORM/sdk" -c *.swift >> $QLTEST_LOG 2>&1