Skip to content

Commit

Permalink
Patches for not auto-converting concrete declarations like atoi to bu… (
Browse files Browse the repository at this point in the history
#1006)

* Patches for not auto-converting concrete declarations like atoi to builtin intrinsics.

* Update port-version

* Update Z3 to latest 4.12.1 version

---------

Co-authored-by: Eric Kilmer <[email protected]>
  • Loading branch information
Peter Goodman and ekilmer authored Jan 31, 2023
1 parent d77dd7b commit 125d8ab
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
21 changes: 19 additions & 2 deletions ports/llvm-15/0025-PASTA-patches.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From e662db370ffe95bc663d1e1fa350ab3c35bd61b3 Mon Sep 17 00:00:00 2001
From a2055c89f23ad44059dd11a91387e69fdb1cd5e0 Mon Sep 17 00:00:00 2001
From: Peter Goodman <[email protected]>
Date: Mon, 14 Nov 2022 14:51:27 -0500
Subject: [PATCH] Patches for PASTA
Expand All @@ -16,7 +16,8 @@ Subject: [PATCH] Patches for PASTA
clang/lib/Lex/Preprocessor.cpp | 43 +++-
clang/lib/Lex/TokenLexer.cpp | 39 +++-
clang/lib/Parse/ParseTemplate.cpp | 7 +
12 files changed, 730 insertions(+), 79 deletions(-)
clang/lib/Sema/SemaDecl.cpp | 5 +
13 files changed, 735 insertions(+), 79 deletions(-)

diff --git a/clang/include/clang/Lex/PPCallbacks.h b/clang/include/clang/Lex/PPCallbacks.h
index 045df8711..cba195cff 100644
Expand Down Expand Up @@ -1637,6 +1638,22 @@ index e32ea6003..942c71526 100644
// Update the token cache to match what we just did if necessary.
if (CachingTokens) {
// If the previous cached token is being merged, delete it.
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 75ffa8b0a..f4d175de2 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -6261,6 +6261,11 @@ NamedDecl *Sema::HandleDeclarator(Scope *S, Declarator &D,
Previous.setRedeclarationKind(ForExternalRedeclaration);
}

+ // PASTA PATCH: Disable auto-creation of builtins from things like `atoi`;
+ // it ends up leading to a lot of source location information
+ // being dropped.
+ CreateBuiltins = CreateBuiltins ? false : false;
+
LookupName(Previous, S, CreateBuiltins);
} else { // Something like "int foo::x;"
LookupQualifiedName(Previous, DC);
--
2.39.0

1 change: 1 addition & 0 deletions ports/llvm-15/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "llvm-15",
"version": "15.0.7",
"port-version": 1,
"description": "The LLVM Compiler Infrastructure.",
"homepage": "https://llvm.org",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions ports/z3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ vcpkg_add_to_path("${PYTHON3_DIR}")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Z3Prover/z3
REF z3-4.12.0
SHA512 53a51c8304fa4356d13293f68b14d9d9eef57a0771c6698d38aea5fac62c4e52c41ff003cb6d771a32645d2aa4ef59be5f792f2efbee927d06ac8280094976e5
REF z3-4.12.1
SHA512 031fba9cc000a8da0025f95fa3f1c7519071d1b7775b377ff3192c505bb4c7e3d267da246c9ae68c940224e055a3c30571d2c0d7fbb042ec9a3d5849543a385c
HEAD_REF master
PATCHES
fix-install-path.patch
Expand Down
2 changes: 1 addition & 1 deletion ports/z3/remove-flag-overrides.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ index 477410ba8..fcca03917 100644
cmake_minimum_required(VERSION 3.4)

-set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_compiler_flags_overrides.cmake")
project(Z3 VERSION 4.12.0.0 LANGUAGES CXX)
project(Z3 VERSION 4.12.1.0 LANGUAGES CXX)

################################################################################
2 changes: 1 addition & 1 deletion ports/z3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "z3",
"version": "4.12.0",
"version": "4.12.1",
"description": "Z3 is a theorem prover from Microsoft Research",
"homepage": "https://github.com/Z3Prover/z3",
"license": "MIT",
Expand Down

0 comments on commit 125d8ab

Please sign in to comment.