diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 7615cee..081292e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -2,7 +2,7 @@ # [Choice] Debian / Ubuntu version (use Debian 11, Ubuntu 18.04/22.04 on local arm64/Apple Silicon): debian-11, debian-10, ubuntu-22.04, ubuntu-20.04, ubuntu-18.04 ARG IMAGE="ubuntu-22.04" -ARG LLVM_VERSION="18" +ARG LLVM_VERSION="19" FROM mcr.microsoft.com/vscode/devcontainers/cpp:${IMAGE} ARG LLVM_VERSION diff --git a/.devcontainer/install-llvm.sh b/.devcontainer/install-llvm.sh index 48e3e1b..7955685 100644 --- a/.devcontainer/install-llvm.sh +++ b/.devcontainer/install-llvm.sh @@ -11,7 +11,7 @@ usage() { exit 1; } -CURRENT_LLVM_STABLE=18 +CURRENT_LLVM_STABLE=19 BASE_URL="http://apt.llvm.org" # Check for required tools @@ -118,6 +118,7 @@ LLVM_VERSION_PATTERNS[15]="-15" LLVM_VERSION_PATTERNS[16]="-16" LLVM_VERSION_PATTERNS[17]="-17" LLVM_VERSION_PATTERNS[18]="-18" +LLVM_VERSION_PATTERNS[19]="-19" if [ ! ${LLVM_VERSION_PATTERNS[$LLVM_VERSION]+_} ]; then echo "This script does not support LLVM version $LLVM_VERSION" @@ -169,4 +170,4 @@ apt-get install -f -y $PKG update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-$LLVM_VERSION 60 update-alternatives --install /usr/bin/cc cc /usr/bin/clang-$LLVM_VERSION 60 -ln -s /usr/bin/FileCheck-$LLVM_VERSION /usr/bin/FileCheck +ln -s /usr/bin/FileCheck-$LLVM_VERSION /usr/bin/FileCheck \ No newline at end of file diff --git a/.devcontainer/install-vast.sh b/.devcontainer/install-vast.sh index d7cefc5..b65955d 100644 --- a/.devcontainer/install-vast.sh +++ b/.devcontainer/install-vast.sh @@ -31,19 +31,18 @@ install_gap() { git clone --recursive "$GAP_REPO" "$GAP_BUILD" cd "$GAP_BUILD" mkdir -p build && cd build - cmake -G Ninja .. -DGAP_ENABLE_MLIR=ON -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DMLIR_DIR="/usr/lib/llvm-18/lib/cmake/mlir" + cmake -G Ninja .. -DGAP_ENABLE_MLIR=ON -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DMLIR_DIR="/usr/lib/llvm-19/lib/cmake/mlir" ninja && sudo ninja install } build_vast() { echo "Cloning VAST repository..." - git clone --branch v0.0.33 --recursive "$VAST_REPO" "$BUILD_DIR" + git clone --branch v0.0.66 --recursive "$VAST_REPO" "$BUILD_DIR" echo "Installing VAST..." cd "$BUILD_DIR" && mkdir -p build && cd build - cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_LINKER_TYPE=LLD -DMLIR_DIR="/usr/lib/llvm-18/lib/cmake/mlir" + cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_LINKER_TYPE=LLD -DMLIR_DIR="/usr/lib/llvm-19/lib/cmake/mlir" cmake --build . && sudo cmake --install . - cat CMakeCache.txt } clean_up() { @@ -56,4 +55,4 @@ install_gap build_vast clean_up -echo "VAST has been successfully installed!" \ No newline at end of file +echo "VAST has been successfully installed!" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48d6a87..bc19028 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: build: strategy: matrix: - llvm-version: [18] + llvm-version: [19] image-version: [22.04] build-type: [Release, Debug] sanitizers: [ON, OFF] diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index 018090d..6bcb22f 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -13,7 +13,7 @@ jobs: build: strategy: matrix: - llvm-version: [18] + llvm-version: [19] image-version: [22.04] runs-on: ubuntu-22.04 timeout-minutes: 45 diff --git a/CMakeLists.txt b/CMakeLists.txt index 395d093..1d468b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,7 +79,7 @@ FindAndSelectClangCompiler() # # LLVM & MLIR & Clang # -find_package(LLVM 18.1 REQUIRED CONFIG) +find_package(LLVM 19.1 REQUIRED CONFIG) message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}") diff --git a/lib/patchestry/AST/TypeBuilder.cpp b/lib/patchestry/AST/TypeBuilder.cpp index 30b9cf2..b723770 100644 --- a/lib/patchestry/AST/TypeBuilder.cpp +++ b/lib/patchestry/AST/TypeBuilder.cpp @@ -41,7 +41,7 @@ namespace patchestry::ast { // Traverse through missing type definition for a composite type and create the complete // definition for them for (auto &[key, decl] : missing_type_definition) { - if (const auto *record_decl = llvm::dyn_cast< clang::RecordDecl >(decl)) { + if (llvm::isa< clang::RecordDecl >(decl)) { auto iter = lifted_types.find(key); // if type key does not exist in the lifted types, it could be a bug in create // types.