Skip to content

Commit 2430ad5

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web'
2 parents 79c65d4 + 77da90b commit 2430ad5

File tree

4 files changed

+50
-6
lines changed

4 files changed

+50
-6
lines changed

.github/workflows/sync-main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: automatic sync main branch from llvm-project to llvm
2+
3+
on:
4+
schedule:
5+
- cron: '/10 * * * *'
6+
jobs:
7+
sync:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
# persist-credentials: false allows us to use our own credentials for
13+
# pushing to the repository. Otherwise, the default github actions token
14+
# is used.
15+
persist-credentials: false
16+
fetch-depth: 0
17+
path: src
18+
- name: Sync
19+
env:
20+
BRANCH: main
21+
SYNC_REPO: https://github.com/llvm/llvm-project
22+
LLVMBOT_TOKEN: ${{ secrets.LLVM_MAIN_SYNC_BBSYCL_TOKEN }}
23+
run: |
24+
cd $GITHUB_WORKSPACE/src
25+
branch_exist=`git ls-remote --heads origin $BRANCH | wc -l`
26+
if [ $branch_exist -ne 0 ]; then
27+
git checkout $BRANCH
28+
git pull --ff --ff-only $SYNC_REPO $BRANCH
29+
if [ $? -ne 0 ]; then
30+
echo "failed to pull from $SYNC_REPO $BRANCH, abort"
31+
exit 1
32+
fi
33+
git_status=`git rev-list --count --left-right origin/$BRANCH...$BRANCH`
34+
if [ "0 0" == "$git_status" ] ; then
35+
echo "no change, skip"
36+
elif [[ "$git_status" = 0* ]] ; then
37+
git push https://[email protected]/${{ github.repository }} ${BRANCH}
38+
else
39+
echo "$BRANCH branch invalid state"
40+
exit 1
41+
fi
42+
else
43+
git remote add upstream $SYNC_REPO
44+
git fetch upstream
45+
git checkout -B $BRANCH upstream/$BRANCH
46+
git push https://[email protected]/${{ github.repository }} ${BRANCH}
47+
fi
48+
echo "sync finished"

clang/include/clang/Sema/Sema.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,6 @@ class SYCLIntegrationHeader {
410410
/// integration header emission time.
411411
llvm::SmallVector<SpecConstID, 4> SpecConsts;
412412

413-
/// Used for emitting diagnostics.
414-
DiagnosticsEngine &Diag;
415-
416413
/// Whether header is generated with unnamed lambda support
417414
bool UnnamedLambdaSupport;
418415

clang/lib/Driver/Driver.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,6 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
716716
C.addOffloadDeviceToolChain(CudaTC, OFK);
717717
} else if (IsHIP) {
718718
const ToolChain *HostTC = C.getSingleOffloadToolChain<Action::OFK_Host>();
719-
const llvm::Triple &HostTriple = HostTC->getTriple();
720719
auto OFK = Action::OFK_HIP;
721720
llvm::Triple HIPTriple = getHIPOffloadTargetTriple();
722721
// Use the HIP and host triples as the key into
@@ -5116,7 +5115,7 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
51165115
OffloadBuilder.addDeviceDependencesToHostAction(
51175116
Current, InputArg, phases::Link, PL.back(), PL);
51185117
};
5119-
for (const StringRef &LA : LinkArgs) {
5118+
for (StringRef LA : LinkArgs) {
51205119
// At this point, we will process the archives for FPGA AOCO and individual
51215120
// archive unbundling for Windows.
51225121
if (!isStaticArchiveFile(LA))

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3988,7 +3988,7 @@ void SYCLIntegrationHeader::setCallsThisItem(bool B) {
39883988
SYCLIntegrationHeader::SYCLIntegrationHeader(DiagnosticsEngine &_Diag,
39893989
bool _UnnamedLambdaSupport,
39903990
Sema &_S)
3991-
: Diag(_Diag), UnnamedLambdaSupport(_UnnamedLambdaSupport), S(_S) {}
3991+
: UnnamedLambdaSupport(_UnnamedLambdaSupport), S(_S) {}
39923992

39933993
// -----------------------------------------------------------------------------
39943994
// Utility class methods

0 commit comments

Comments
 (0)