Skip to content

Commit afd1c99

Browse files
bors[bot]vext01
andauthored
23: Fix formatting. r=ltratt a=vext01 Co-authored-by: Edd Barrett <[email protected]>
2 parents ff21fd3 + 9186637 commit afd1c99

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

.buildbot.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
set -e
44

5+
# Buildbot will have done a shallow clone, but the formatting step requires
6+
# both full git history, and a complete set of upstream llvm release tags.
7+
git fetch --unshallow
8+
git fetch --tags https://github.com/llvm/llvm-project
9+
510
INST_DIR=`pwd`/inst
611

712
mkdir -p build
@@ -14,18 +19,20 @@ cmake -DCMAKE_INSTALL_PREFIX=${INST_DIR} \
1419
../llvm
1520
make -j `nproc` install
1621

22+
# clang-format any new files that we've introduced ourselves.
23+
cd ..
24+
PATH=${INST_DIR}/bin:${PATH}
25+
sh yk_format_new_files.sh
26+
git diff --exit-code
27+
1728
# There are many test suites for LLVM:
1829
# https://llvm.org/docs/TestingGuide.html
1930
#
2031
# This runs unit and integration tests.
32+
cd build
2133
make -j `nproc` check-all
2234
cd ..
2335

24-
# clang-format any new files that we've introduced ourselves.
25-
PATH=${INST_DIR}/bin:${PATH}
26-
sh yk_format_new_files.sh
27-
git diff --exit-code
28-
2936
# FIXME The commented code below should run the `test-suite` tests, as
3037
# described at https://llvm.org/docs/TestSuiteGuide.html.
3138
#

llvm/lib/Transforms/Yk/ControlPoint.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,16 @@ class YkControlPoint : public ModulePass {
168168
// The old control point should be of the form:
169169
// control_point(YkMT*, YkLocation*)
170170
assert(OldCtrlPointCall->arg_size() == YK_OLD_CONTROL_POINT_NUM_ARGS);
171-
Type *YkMTTy = OldCtrlPointCall->getArgOperand(YK_CONTROL_POINT_ARG_MT_IDX)->getType();
172-
Type *YkLocTy = OldCtrlPointCall->getArgOperand(YK_CONTROL_POINT_ARG_LOC_IDX)->getType();
171+
Type *YkMTTy =
172+
OldCtrlPointCall->getArgOperand(YK_CONTROL_POINT_ARG_MT_IDX)->getType();
173+
Type *YkLocTy =
174+
OldCtrlPointCall->getArgOperand(YK_CONTROL_POINT_ARG_LOC_IDX)
175+
->getType();
173176

174177
// Create the new control point.
175-
FunctionType *FType =
176-
FunctionType::get(Type::getVoidTy(Context),
177-
{YkMTTy, YkLocTy, CtrlPointVarsTy->getPointerTo()}, false);
178+
FunctionType *FType = FunctionType::get(
179+
Type::getVoidTy(Context),
180+
{YkMTTy, YkLocTy, CtrlPointVarsTy->getPointerTo()}, false);
178181
Function *NF = Function::Create(FType, GlobalVariable::ExternalLinkage,
179182
YK_NEW_CONTROL_POINT, M);
180183

@@ -197,11 +200,9 @@ class YkControlPoint : public ModulePass {
197200

198201
// Insert call to the new control point.
199202
Instruction *NewCtrlPointCallInst = Builder.CreateCall(
200-
NF, {
201-
OldCtrlPointCall->getArgOperand(YK_CONTROL_POINT_ARG_MT_IDX),
202-
OldCtrlPointCall->getArgOperand(YK_CONTROL_POINT_ARG_LOC_IDX),
203-
InputStruct
204-
});
203+
NF, {OldCtrlPointCall->getArgOperand(YK_CONTROL_POINT_ARG_MT_IDX),
204+
OldCtrlPointCall->getArgOperand(YK_CONTROL_POINT_ARG_LOC_IDX),
205+
InputStruct});
205206

206207
// Once the control point returns we need to extract the (potentially
207208
// mutated) values from the returned YkCtrlPointStruct and reassign them to

yk_format_new_files.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#
33
# Format any new files that we have added in our fork.
44

5+
set -e
6+
57
# The LLVM version tag we are forked from.
68
FORKED_LLVM_VERSION=`git describe --abbrev=0 --match 'llvmorg-*'`
79

0 commit comments

Comments
 (0)