Skip to content

Commit

Permalink
Drop LLVM 10 support
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDenisov authored and AlexDenisov committed Jan 17, 2023
1 parent d055e14 commit de5279f
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-ubuntu-20.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
container: ubuntu:20.04
strategy:
matrix:
LLVM_VERSION: ["10.0", "11.0", "12.0"]
LLVM_VERSION: ["11.0", "12.0"]

steps:
- name: Install software
Expand Down
2 changes: 1 addition & 1 deletion docs/Features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Features
Working with mutations found in Git Diff changesets.

- Mull requires test programs to be compiled with Clang/LLVM. Mull supports
all LLVM versions starting from LLVM 10.
all LLVM versions starting from LLVM 11 (older versions support older versions).

For a more detailed description of Mull's architecture, see
`How Mull works <HowMullWorks.html>`_.
2 changes: 1 addition & 1 deletion docs/HackingOnMull.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ LLVM
----

You need LLVM to build and debug Mull.
You can use any LLVM version between 10.0 and 14.0.
You can use any LLVM version between 11.0 and 15.0.

As of the version 0.14.0, Mull can be compiled against LLVM/Clang available
through your package manager (e.g. apt or homebrew).
Expand Down
2 changes: 1 addition & 1 deletion docs/HowMullWorks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Platform support
----------------

Mull has a great support of macOS and various Linux systems across all modern
versions of LLVM from 10.0 to 14.0. All the new versions of LLVM are supported as
versions of LLVM from 11.0 to 15.0. All the new versions of LLVM are supported as
soon as they released.

Mull is reported to work on Windows Subsystem for Linux, but no official support
Expand Down
5 changes: 2 additions & 3 deletions docs/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,20 @@ Install the package:
.. code-block:: bash
sudo apt-get update
sudo apt-get install mull-10 # Ubuntu 18.04
sudo apt-get install mull-12 # Ubuntu 20.04
Check if everything works:

.. code-block:: bash
$ mull-runner-10 --version
$ mull-runner-12 --version
Mull: Practical mutation testing for C and C++
Home: https://github.com/mull-project/mull
Docs: https://mull.readthedocs.io
Version: 0.15.0
Commit: ab159cd
Date: 20 Jan 2022
LLVM: 10.0.0
LLVM: 12.0.0
You can also get the latest "nightly" build using the corresponding source:

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/HelloWorld.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mutants and generate mutation testing reports.
down to ``Killing mutants again, all killed`` below.

.. note::
Clang 10 or newer is required!
Clang 11 or newer is required!

----

Expand Down Expand Up @@ -74,7 +74,7 @@ Let's fix that!
To pass the plugin to Clang, you need to add a few compiler flags.

.. note::
For Clang 10 and 11 also pass ``-O1``, otherwise the plugin won't be called.
For Clang 11 also pass ``-O1``, otherwise the plugin won't be called.

.. note::
``-grecord-command-line`` doesn't currently work if you compile several files in one go,
Expand Down
5 changes: 1 addition & 4 deletions include/mull/AST/MullClangCompatibility.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#include <clang/Basic/SourceLocation.h>

#if LLVM_VERSION_MAJOR >= 11
#include <clang/AST/ParentMapContext.h>
#endif
#include <clang/Basic/SourceLocation.h>

namespace clang {
class Stmt;
Expand Down
10 changes: 0 additions & 10 deletions infrastructure/helpers/variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,6 @@ llvm_mapping:
- clang-11
cmake_cc: clang-11
cmake_cxx: clang++-11
10.0.0:
cmake_search_paths: "/usr/lib/llvm-10/cmake/;/usr/lib/cmake/clang-10/"
packages:
- llvm-10-dev
- libclang-10-dev
- libc++-10-dev
- libc++abi-10-dev
- clang-10
cmake_cc: clang-10
cmake_cxx: clang++-10

source_dir: "{{ working_dir }}/mull"
debug_build_dir: "{{ working_dir }}/build.mull.debug.dir"
Expand Down
3 changes: 0 additions & 3 deletions tests-lit/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ config.substitutions.append(('%python3', python3))

config.suffixes = ['.cpp', '.c', '.itest']

if int(llvm_major_version) >= 11:
config.available_features.add('LLVM_11_OR_HIGHER')

if platform.system() == 'Darwin':
config.available_features.add('MACOS')
else:
Expand Down
2 changes: 0 additions & 2 deletions tests-lit/tests/deduplication/01/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ int main() {
}

// clang-format off
// Runs infinitely on LLVM 10 or lower
// REQUIRES: LLVM_11_OR_HIGHER
// RUN: %clang_cxx %sysroot %pass_mull_ir_frontend %s -g -o %s-ir.exe
// RUN: unset TERM; %mull_runner -ide-reporter-show-killed %s-ir.exe 2>&1 | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines
// CHECK:[info] Killed mutants (1/1):
Expand Down
4 changes: 1 addition & 3 deletions tests/Helpers/InMemoryCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
#include <clang/Lex/PreprocessorOptions.h>

#include <llvm/IR/Module.h>
#include <llvm/Support/TargetSelect.h>
#if LLVM_VERSION_MAJOR >= 11
#include <llvm/Support/Host.h>
#endif
#include <llvm/Support/TargetSelect.h>

using namespace mull_test;

Expand Down
36 changes: 0 additions & 36 deletions tools/mull-cxx-frontend/src/ASTNodeFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ clang::UnaryOperator *ASTNodeFactory::createUnaryOperator(clang::UnaryOperator::
clang::Expr *expr,
clang::QualType resultType,
clang::ExprValueKind valueKind) {
#if LLVM_VERSION_MAJOR >= 11
clang::FPOptionsOverride fpOptionsOverride;
return clang::UnaryOperator::Create(context,
expr,
Expand All @@ -129,22 +128,12 @@ clang::UnaryOperator *ASTNodeFactory::createUnaryOperator(clang::UnaryOperator::
NULL_LOCATION,
false,
fpOptionsOverride);
#else
return new (context) clang::UnaryOperator(expr,
opcode,
resultType,
valueKind,
clang::ExprObjectKind::OK_Ordinary,
NULL_LOCATION,
false);
#endif
}

clang::BinaryOperator *ASTNodeFactory::createBinaryOperator(clang::BinaryOperator::Opcode opcode,
clang::Expr *lhs, clang::Expr *rhs,
clang::QualType resultType,
clang::ExprValueKind valueKind) {
#if LLVM_VERSION_MAJOR >= 11
clang::FPOptionsOverride fpOptionsOverride;
return clang::BinaryOperator::Create(context,
lhs,
Expand All @@ -155,25 +144,13 @@ clang::BinaryOperator *ASTNodeFactory::createBinaryOperator(clang::BinaryOperato
clang::ExprObjectKind::OK_Ordinary,
NULL_LOCATION,
fpOptionsOverride);
#else
clang::FPOptions fpOptions;
return new (context) clang::BinaryOperator(lhs,
rhs,
opcode,
resultType,
valueKind,
clang::ExprObjectKind::OK_Ordinary,
NULL_LOCATION,
fpOptions);
#endif
}

clang::CompoundAssignOperator *ASTNodeFactory::createCompoundAssignOperator(
clang::BinaryOperator::Opcode opcode, clang::Expr *lhs, clang::Expr *rhs,
clang::QualType resultType, clang::ExprValueKind valueKind, clang::QualType compLHSType,
clang::QualType compResultType) {

#if LLVM_VERSION_MAJOR >= 11
clang::FPOptionsOverride fpOptionsOverride;
return clang::CompoundAssignOperator::Create(context,
lhs,
Expand All @@ -186,19 +163,6 @@ clang::CompoundAssignOperator *ASTNodeFactory::createCompoundAssignOperator(
fpOptionsOverride,
compLHSType,
compResultType);
#else
clang::FPOptions fpOptions;
return new (context) clang::CompoundAssignOperator(lhs,
rhs,
opcode,
resultType,
valueKind,
clang::ExprObjectKind::OK_Ordinary,
compLHSType,
compResultType,
NULL_LOCATION,
fpOptions);
#endif
}

clang::CallExpr *ASTNodeFactory::createCallExprSingleArg(clang::Expr *function,
Expand Down
2 changes: 0 additions & 2 deletions tools/mull-cxx-frontend/src/ClangASTMutator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
#include "ASTNodeFactory.h"

#include <clang/AST/ASTContext.h>
#if LLVM_VERSION_MAJOR >= 11
#include <clang/AST/ParentMapContext.h>
#endif
#include <clang/Basic/SourceLocation.h>
#include <llvm/Support/Casting.h>

Expand Down

0 comments on commit de5279f

Please sign in to comment.