Skip to content

Commit f6783d6

Browse files
committed
update to LLVM-14
2 parents ba0e60a + f000aeb commit f6783d6

22 files changed

Lines changed: 39 additions & 128 deletions

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: true
1414
matrix:
15-
compiler: [ [clang++-13, clang-13] ]
15+
compiler: [ [clang++-14, clang-14] ]
1616
build: [ Debug, Release ]
1717

1818
continue-on-error: false
@@ -42,16 +42,16 @@ jobs:
4242
shell: bash
4343
run: |
4444
sudo apt-key adv --fetch-keys https://apt.llvm.org/llvm-snapshot.gpg.key
45-
sudo add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main'
45+
sudo add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main'
4646
sudo apt-get update
4747
sudo apt-get -y install --no-install-recommends \
4848
${{ matrix.compiler[1] }} \
49-
llvm-13-dev \
50-
libllvm13 \
51-
libclang-common-13-dev \
52-
libclang-13-dev \
53-
libclang-cpp13-dev \
54-
clang-tidy-13
49+
llvm-14-dev \
50+
libllvm14 \
51+
libclang-common-14-dev \
52+
libclang-14-dev \
53+
libclang-cpp14-dev \
54+
clang-tidy-14
5555
5656
- name: Building Phasar in ${{ matrix.build }} with ${{ matrix.compiler[0] }}
5757
env:

.github/workflows/reviewdog-clang-format.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
- tool: clang-format
1616
install: |
1717
sudo apt-key adv --fetch-keys https://apt.llvm.org/llvm-snapshot.gpg.key
18-
sudo add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main'
18+
sudo add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main'
1919
sudo apt-get update
20-
sudo apt-get -y install --no-install-recommends clang-format-13
20+
sudo apt-get -y install --no-install-recommends clang-format-14
2121
regex: \.(h|c|hpp|cpp)$
22-
command: clang-format-13 --style=file -i
22+
command: clang-format-14 --style=file -i
2323

2424
continue-on-error: false
2525
steps:

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v2.4.0
5+
rev: v4.3.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- id: check-yaml
1010
- id: check-added-large-files
1111
- id: requirements-txt-fixer
1212
- repo: https://github.com/pre-commit/mirrors-clang-format
13-
rev: 'v13.0.0'
13+
rev: 'v14.0.6'
1414
hooks:
1515
- id: clang-format

.travis.yml

Lines changed: 0 additions & 88 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ include_directories(${SQLITE3_INCLUDE_DIR})
181181
# LLVM
182182
if (NOT PHASAR_IN_TREE)
183183
# Only search for LLVM if we build out of tree
184-
find_package(LLVM 13 REQUIRED CONFIG)
184+
find_package(LLVM 14 REQUIRED CONFIG)
185185
include_directories(${LLVM_INCLUDE_DIRS})
186186
link_directories(${LLVM_LIB_PATH} ${LLVM_LIBRARY_DIRS})
187187
endif()

Config.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ foreach(component ${phasar_FIND_COMPONENTS})
99
endforeach()
1010

1111
function(phasar_config executable)
12-
find_package(LLVM 13 REQUIRED CONFIG)
12+
find_package(LLVM 14 REQUIRED CONFIG)
1313
include_directories(${LLVM_INCLUDE_DIRS})
1414
link_directories(${LLVM_LIB_PATH} ${LLVM_LIBRARY_DIRS})
1515
find_library(LLVM_LIBRARY NAMES LLVM HINTS ${LLVM_LIBRARY_DIRS})

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ PhASAR requires C++-17.
2020

2121
Currently supported version of LLVM
2222
-----------------------------------
23-
PhASAR is currently set up to support LLVM-13.0.
23+
PhASAR is currently set up to support LLVM-14.0.
2424

2525
What is PhASAR?
2626
---------------

bootstrap.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ source ./utils/safeCommandsSet.sh
55

66
readonly PHASAR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
77
readonly PHASAR_INSTALL_DIR="/usr/local/phasar"
8-
readonly LLVM_INSTALL_DIR="/usr/local/llvm-13"
8+
readonly LLVM_INSTALL_DIR="/usr/local/llvm-14"
99

1010
NUM_THREADS=$(nproc)
11-
LLVM_RELEASE=llvmorg-13.0.0
11+
LLVM_RELEASE=llvmorg-14.0.0
1212
DO_UNIT_TEST=true
1313

1414

lib/PhasarLLVM/ControlFlow/Resolver/OTFResolver.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,11 @@ std::vector<std::pair<const llvm::Value *, const llvm::Value *>>
266266
OTFResolver::getActualFormalPointerPairs(const llvm::CallBase *CallSite,
267267
const llvm::Function *CalleeTarget) {
268268
std::vector<std::pair<const llvm::Value *, const llvm::Value *>> Pairs;
269-
Pairs.reserve(CallSite->getNumArgOperands());
269+
Pairs.reserve(CallSite->arg_size());
270270
// ordinary case
271271

272272
unsigned Idx = 0;
273-
for (; Idx < CallSite->getNumArgOperands() && Idx < CalleeTarget->arg_size();
274-
++Idx) {
273+
for (; Idx < CallSite->arg_size() && Idx < CalleeTarget->arg_size(); ++Idx) {
275274
// only collect pointer typed pairs
276275
if (CallSite->getArgOperand(Idx)->getType()->isPointerTy() &&
277276
CalleeTarget->getArg(Idx)->getType()->isPointerTy()) {
@@ -302,7 +301,7 @@ OTFResolver::getActualFormalPointerPairs(const llvm::CallBase *CallSite,
302301
}
303302

304303
if (VarArgs) {
305-
for (; Idx < CallSite->getNumArgOperands(); ++Idx) {
304+
for (; Idx < CallSite->arg_size(); ++Idx) {
306305
if (CallSite->getArgOperand(Idx)->getType()->isPointerTy()) {
307306
Pairs.emplace_back(CallSite->getArgOperand(Idx), VarArgs);
308307
}

lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils/DataFlowUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ DataFlowUtils::getSanitizedArgList(const llvm::CallInst *CallInst,
758758
const llvm::Value *>>
759759
SanitizedArgList;
760760

761-
for (unsigned I = 0; I < CallInst->getNumArgOperands(); ++I) {
761+
for (unsigned I = 0; I < CallInst->arg_size(); ++I) {
762762
auto *const Arg = CallInst->getOperand(I);
763763
const auto *const Param = getNthFunctionArgument(DestFun, I);
764764

0 commit comments

Comments
 (0)