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
46 changes: 0 additions & 46 deletions .github/workflows/macos-12.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: macOS

on:
pull_request:
push:
branches:
- main

jobs:
test:
name: LLVM ${{ matrix.LLVM_VERSION }}
runs-on: macos-latest
strategy:
matrix:
LLVM_VERSION: [18, 19]

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Install LLVM
run: brew install llvm@${{ matrix.LLVM_VERSION }}

- name: Build and test (Debug)
run: |
cmake -B build-debug -G Ninja \
-DPATH_TO_LLVM=$(brew --prefix llvm@${{ matrix.LLVM_VERSION }})
cmake --build build-debug --target irm-tests
./build-debug/tests/irm-tests

- name: Build and test (Release)
run: |
cmake -B build-release -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DPATH_TO_LLVM=$(brew --prefix llvm@${{ matrix.LLVM_VERSION }})
cmake --build build-release --target irm-tests
./build-release/tests/irm-tests
48 changes: 0 additions & 48 deletions .github/workflows/ubuntu-18.04.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/ubuntu-20.04.yaml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/ubuntu-24.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Ubuntu 24.04

on:
pull_request:
push:
branches:
- main

jobs:
test:
name: LLVM ${{ matrix.LLVM_VERSION }}
runs-on: ubuntu-24.04
strategy:
matrix:
LLVM_VERSION: [18, 19]

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Install LLVM
run: sudo apt-get update && sudo apt-get install -y ninja-build llvm-${{ matrix.LLVM_VERSION }}-dev clang-${{ matrix.LLVM_VERSION }}

- name: Build and test (Debug)
env:
CC: clang-${{ matrix.LLVM_VERSION }}
CXX: clang++-${{ matrix.LLVM_VERSION }}
run: |
cmake -B build-debug -G Ninja \
-DPATH_TO_LLVM=/usr/lib/llvm-${{ matrix.LLVM_VERSION }}
cmake --build build-debug --target irm-tests
./build-debug/tests/irm-tests

- name: Build and test (Release)
env:
CC: clang-${{ matrix.LLVM_VERSION }}
CXX: clang++-${{ matrix.LLVM_VERSION }}
run: |
cmake -B build-release -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DPATH_TO_LLVM=/usr/lib/llvm-${{ matrix.LLVM_VERSION }}
cmake --build build-release --target irm-tests
./build-release/tests/irm-tests
5 changes: 0 additions & 5 deletions ci/ansible.cfg

This file was deleted.

54 changes: 0 additions & 54 deletions ci/build.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions ci/download-llvm.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions ci/variables.yaml

This file was deleted.

8 changes: 7 additions & 1 deletion tests/Mutations/CallRemovalTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <gtest/gtest.h>
#include <irm/irm.h>
#include <llvm/Config/llvm-config.h>
#include <llvm/IR/Module.h>

using namespace irm;
Expand All @@ -41,11 +42,16 @@ TEST(CallRemoval, canMutate) {
auto voidFunction = llvm::Function::Create(
voidFunctionType, llvm::Function::InternalLinkage, "call_void", module);

auto ptrType = llvm::PointerType::get(context, 0);
#if LLVM_VERSION_MAJOR >= 19
auto intrinsicFunction = llvm::Intrinsic::getDeclaration(&module, llvm::Intrinsic::vastart, {ptrType});
#else
auto intrinsicFunction = llvm::Intrinsic::getDeclaration(&module, llvm::Intrinsic::vastart);
#endif

auto callInt = llvm::CallInst::Create(intFunction, {}, "", basicBlock);
auto callVoid = llvm::CallInst::Create(voidFunction, {}, "", basicBlock);
auto null = llvm::ConstantPointerNull::get(intType->getPointerTo(0));
auto null = llvm::ConstantPointerNull::get(ptrType);
auto callIntrinsic = llvm::CallInst::Create(intrinsicFunction, { null }, "", basicBlock);

MutatorNoIntrinsics mutatorNoIntrinsics;
Expand Down
Loading