Swift: remove patches from the extractor

Moved elsewhere https://github.com/dsp-testing/codeql-swift-artifacts/pull/3
This commit is contained in:
Alex Denisov 2022-11-30 15:12:55 +01:00
Родитель 45e2a13c37
Коммит 0bfe502bb0
3 изменённых файлов: 3 добавлений и 29 удалений

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

@ -1,10 +1,10 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
_swift_prebuilt_version = "swift-5.7.1-RELEASE.44356.85"
_swift_prebuilt_version = "swift-5.7.1-RELEASE.44428.89"
_swift_sha_map = {
"Linux-X64": "c9f17e13cac89f097aaaa65b1bc32aac566c8e4f3b68fc18e970cc3ee31f4913",
"macOS-X64": "638ac0552e9e1ccee9e276525d1ea9454256feec20bc778efa8856fd6e506987",
"Linux-X64": "1fa0b62b3a87c6528bd21b3f3fa1b32ad00e2b6ff04c20652c93c7d00c4cf517",
"macOS-X64": "6e1239335874cbde635ae9ca9eeb215efee4988888a75f4eda1abbcf97e4d038",
}
_swift_arch_map = {
@ -22,10 +22,6 @@ def codeql_workspace(repository_name = "codeql"):
_swift_prebuilt_version,
repo_arch,
),
patches = [
"@%s//swift/third_party/swift-llvm-support:patches/remove_getFallthrougDest_assert.patch" % repository_name,
],
patch_args = ["-p1"],
build_file = "@%s//swift/third_party/swift-llvm-support:BUILD.swift-prebuilt.bazel" % repository_name,
sha256 = sha256,
)

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

@ -215,17 +215,6 @@ class SwiftDispatcher {
// Emits a Location TRAP entry and attaches it to a `Locatable` trap label
template <typename Locatable>
void attachLocation(Locatable* locatable, TrapLabel<LocatableTag> locatableLabel) {
// Swift 5.7.1 causing a crash when the Swift compiler uses .back() of and empty
// getPatternList() when getting the source location.
// So far this only observed with the entities coming from precompiled modules, so they
// should not have locations anyway.
if constexpr (std::is_base_of<swift::Decl, Locatable>::value) {
if (auto* decl = llvm::dyn_cast<swift::PatternBindingDecl>(locatable)) {
if (decl->getPatternList().empty()) {
return;
}
}
}
attachLocation(locatable->getStartLoc(), locatable->getEndLoc(), locatableLabel);
}

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

@ -1,11 +0,0 @@
diff -ru a/include/swift/AST/Stmt.h b/include/swift/AST/Stmt.h
--- a/include/swift/AST/Stmt.h 2022-09-21 12:56:54.000000000 +0200
+++ b/include/swift/AST/Stmt.h 2022-11-04 14:39:18.407971007 +0100
@@ -920,7 +920,6 @@
/// Get the CaseStmt block to which the fallthrough transfers control.
/// Set during Sema.
CaseStmt *getFallthroughDest() const {
- assert(FallthroughDest && "fallthrough dest is not set until Sema");
return FallthroughDest;
}
void setFallthroughDest(CaseStmt *C) {