Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .github/actions/Build_LLVM/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ runs:
ninja LLVMOrcDebugging -j ${{ env.ncpus }}
ninja clingInterpreter -j ${{ env.ncpus }}
else
# Apply patches
llvm_vers=$(echo "${{ matrix.clang-runtime }}" | tr '[:lower:]' '[:upper:]')
if [[ "${llvm_vers}" == "16" ]]||[[ "${llvm_vers}" == "17" ]]; then
git apply -v ../patches/llvm/clang${{ matrix.clang-runtime }}-*.patch
echo "Apply clang${{ matrix.clang-runtime }}-*.patch patches:"
fi
cd build
cmake -DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects}}" \
-DLLVM_TARGETS_TO_BUILD="${{ matrix.llvm_targets_to_build }}" \
Expand Down Expand Up @@ -132,18 +126,6 @@ runs:
}
else
{
cp -r ..\patches\llvm\clang${{ matrix.clang-runtime }}*
#FIXME: Apply patches without hardcoding
if ( "${{ matrix.clang-runtime }}" -imatch "16" )
{
git apply -v clang16-1-Value.patch
git apply -v clang16-2-CUDA.patch
git apply -v clang16-3-WeakRef.patch
}
elseif ( "${{ matrix.clang-runtime }}" -imatch "17" )
{
git apply -v clang17-1-NewOperator.patch
}
cd build
echo "Apply clang${{ matrix.clang-runtime }}-*.patch patches:"
cmake -DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects}}" `
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
python-version: "3.11"

- name: Install LLVM and Clang
uses: KyleMayes/[email protected].3
uses: KyleMayes/[email protected].7
with:
version: "17.0.6"
version: "20.1.4"

- name: install lit
run: pip install lit
Expand Down
63 changes: 0 additions & 63 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,6 @@ jobs:
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu24-arm-gcc12-clang-repl-17-cppyy
os: ubuntu-24.04-arm
compiler: gcc-12
clang-runtime: '17'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu24-arm-gcc12-clang-repl-16
os: ubuntu-24.04-arm
compiler: gcc-12
clang-runtime: '16'
cling: Off
cppyy: Off
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu24-arm-gcc9-clang18-cling-cppyy
os: ubuntu-24.04-arm
compiler: gcc-9
Expand Down Expand Up @@ -106,22 +90,6 @@ jobs:
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu24-x86-gcc12-clang-repl-17-cppyy
os: ubuntu-24.04
compiler: gcc-12
clang-runtime: '17'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu24-x86-gcc12-clang-repl-16
os: ubuntu-24.04
compiler: gcc-12
clang-runtime: '16'
cling: Off
cppyy: Off
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
- name: ubu24-x86-gcc9-clang18-cling-cppyy
os: ubuntu-24.04
compiler: gcc-9
Expand Down Expand Up @@ -156,22 +124,6 @@ jobs:
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host"
- name: osx15-arm-clang-clang-repl-17-cppyy
os: macos-15
compiler: clang
clang-runtime: '17'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host"
- name: osx15-arm-clang-clang-repl-16
os: macos-15
compiler: clang
clang-runtime: '16'
cling: Off
cppyy: Off
llvm_enable_projects: "clang"
llvm_targets_to_build: "host"
- name: osx15-arm-clang-clang18-cling-cppyy
os: macos-15
compiler: clang
Expand Down Expand Up @@ -206,21 +158,6 @@ jobs:
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host"
- name: osx13-x86-clang-clang-repl-17-cppyy
os: macos-13
compiler: clang
clang-runtime: '17'
cling: Off
cppyy: On
llvm_enable_projects: "clang"
llvm_targets_to_build: "host"
- name: osx13-x86-clang-clang-repl-16
os: macos-13
compiler: clang
clang-runtime: '16'
cling: Off
llvm_enable_projects: "clang"
llvm_targets_to_build: "host"
- name: osx13-x86-clang-clang18-cling-cppyy
os: macos-13
compiler: clang
Expand Down
8 changes: 4 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ build:
tools:
python: "3.11"
apt_packages:
- clang-16
- clang-18
- cmake
- libclang-16-dev
- llvm-16-dev
- llvm-16-tools
- libclang-18-dev
- llvm-18-dev
- llvm-18-tools
14 changes: 1 addition & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,13 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
include(GNUInstallDirs)
## Define supported version of clang and llvm

if (CPPINTEROP_USE_CLING)
set(CLANG_MIN_SUPPORTED 18.0)
else()
set(CLANG_MIN_SUPPORTED 16.0)
endif(CPPINTEROP_USE_CLING)
set(CLANG_MAX_SUPPORTED "20.1.x")
set(CLANG_VERSION_UPPER_BOUND 21.0.0)
if (CPPINTEROP_USE_CLING)
set(LLD_MIN_SUPPORTED 18.0)
else()
set(LLD_MIN_SUPPORTED 16.0)
endif(CPPINTEROP_USE_CLING)
set(LLD_MAX_SUPPORTED "20.1.x")
set(LLD_VERSION_UPPER_BOUND 21.0.0)
if (CPPINTEROP_USE_CLING)
set(LLVM_MIN_SUPPORTED 18.0)
else()
set(LLVM_MIN_SUPPORTED 16.0)
endif(CPPINTEROP_USE_CLING)
set(LLVM_MAX_SUPPORTED "20.1.x")
set(LLVM_VERSION_UPPER_BOUND 21.0.0)

Expand Down Expand Up @@ -242,7 +230,7 @@ endif()
message(STATUS "Found supported version: Clang ${CLANG_PACKAGE_VERSION}")
message(STATUS "Using ClangConfig.cmake in: ${Clang_DIR}")

## Clang 16 require c++17 or later.
## Clang 18 require c++17 or later.
if (NOT CMAKE_CXX_STANDARD)
set (CMAKE_CXX_STANDARD 17)
endif()
Expand Down
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,6 @@ git clone --depth=1 --branch release/20.x https://github.com/llvm/llvm-project.g
cd llvm-project
```

For Clang 16 & 17, the following patches required for development work. To apply these patches on Linux and MacOS execute the following command(substitute `{version}` with your clang version):

```bash
git apply -v ../CppInterOp/patches/llvm/clang{version}-*.patch
```

and

```powershell
cp -r ..\CppInterOp\patches\llvm\clang{version}* .
git apply -v clang{version}-*.patch
```

on Windows.

##### Build Clang-REPL

Clang-REPL is an interpreter that CppInterOp works alongside. Build Clang (and
Expand Down
17 changes: 0 additions & 17 deletions docs/DevelopersDocumentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,6 @@ Clone the 20.x release of the LLVM project repository.
git clone --depth=1 --branch release/20.x https://github.com/llvm/llvm-project.git
cd llvm-project

For Clang 16 & 17, the following patches required for development work. To apply
these patches on Linux and MacOS execute the following command(substitute
`{version}` with your clang version):

.. code:: bash

git apply -v ../CppInterOp/patches/llvm/clang{version}-*.patch

and

.. code:: powershell

cp -r ..\CppInterOp\patches\llvm\clang17* .
git apply -v clang{version}-*.patch

on Windows.

******************
Build Clang-REPL
******************
Expand Down
17 changes: 0 additions & 17 deletions docs/InstallationAndUsage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,6 @@ Clone the 20.x release of the LLVM project repository.
git clone --depth=1 --branch release/20.x https://github.com/llvm/llvm-project.git
cd llvm-project

For Clang 16 & 17, the following patches required for development work. To apply
these patches on Linux and MacOS execute the following command(substitute
`{version}` with your clang version):

.. code:: bash

git apply -v ../CppInterOp/patches/llvm/clang{version}-*.patch

and

.. code:: powershell

cp -r ..\CppInterOp\patches\llvm\clang17* .
git apply -v clang{version}-*.patch

on Windows.

******************
Build Clang-REPL
******************
Expand Down
12 changes: 0 additions & 12 deletions lib/CppInterOp/CXCppInterOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ CXCursorKind cxcursor_getCursorKindForDecl(const Decl* D) {
default:
if (const auto* TD = dyn_cast<TagDecl>(D)) {
switch (TD->getTagKind()) {
#if CLANG_VERSION_MAJOR >= 18
case TagTypeKind::Interface: // fall through
case TagTypeKind::Struct:
return CXCursor_StructDecl;
Expand All @@ -100,17 +99,6 @@ CXCursorKind cxcursor_getCursorKindForDecl(const Decl* D) {
return CXCursor_UnionDecl;
case TagTypeKind::Enum:
return CXCursor_EnumDecl;
#else
case TagTypeKind::TTK_Interface: // fall through
case TagTypeKind::TTK_Struct:
return CXCursor_StructDecl;
case TagTypeKind::TTK_Class:
return CXCursor_ClassDecl;
case TagTypeKind::TTK_Union:
return CXCursor_UnionDecl;
case TagTypeKind::TTK_Enum:
return CXCursor_EnumDecl;
#endif
}
}
}
Expand Down
11 changes: 0 additions & 11 deletions lib/CppInterOp/Compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,7 @@ static inline char* GetEnv(const char* Var_Name) {
CXXSpecialMemberKind::MoveConstructor
#endif

#if LLVM_VERSION_MAJOR < 18
#define starts_with startswith
#define ends_with endswith
#endif

#if CLANG_VERSION_MAJOR >= 18
#include "clang/Interpreter/CodeCompletion.h"
#endif

#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
Expand Down Expand Up @@ -342,7 +335,6 @@ inline void codeComplete(std::vector<std::string>& Results,
clang::Interpreter& I, const char* code,
unsigned complete_line = 1U,
unsigned complete_column = 1U) {
#if CLANG_VERSION_MAJOR >= 18
// FIXME: We should match the invocation arguments of the main interpreter.
// That can affect the returned completion results.
auto CB = clang::IncrementalCompilerBuilder();
Expand All @@ -366,9 +358,6 @@ inline void codeComplete(std::vector<std::string>& Results,
for (llvm::StringRef r : results)
if (r.find(CC.Prefix) == 0)
Results.push_back(r.str());
#else
assert(false && "CodeCompletion API only available in Clang >= 18.");
#endif
}

} // namespace compat
Expand Down
Loading
Loading