Skip to content

Commit

Permalink
clang: update to clang v5
Browse files Browse the repository at this point in the history
Signed-off-by: Koichi Shiraishi <[email protected]>
  • Loading branch information
zchee committed Nov 16, 2021
1 parent 77faeed commit 3a02f4a
Show file tree
Hide file tree
Showing 54 changed files with 742 additions and 75 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- "main"

env:
LLVM_VERSION: 4
LLVM_VERSION: 5

jobs:
test:
Expand All @@ -20,6 +20,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}

- name: Test in Docker
run: |
docker container run -t --mount type=bind,src=$PWD,dst=/go/src/github.com/go-clang/bootstrap -w /go/src/github.com/go-clang/bootstrap goclang/base:${LLVM_VERSION} make test
docker container run -t --mount type=bind,src=$PWD,dst=/go/src/github.com/go-clang/bootstrap -w /go/src/github.com/go-clang/bootstrap ghcr.io/go-clang/base:${LLVM_VERSION} make test
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ export CC := clang
export CXX := clang++

LLVM_LIBDIR?=$(shell llvm-config --libdir)
LLVM_VERSION?=4
LLVM_VERSION?=5

all: test

test:
CGO_LDFLAGS="-L${LLVM_LIBDIR} -Wl,-rpath,${LLVM_LIBDIR}" go test -v -race ./...
CGO_LDFLAGS="-L${LLVM_LIBDIR} -Wl,-rpath,${LLVM_LIBDIR}" go test -v -race -shuffle=on ./...

docker/test:
docker container run --rm -it --mount type=bind,src=$(CURDIR),dst=/go/src/github.com/go-clang/bootstrap -w /go/src/github.com/go-clang/bootstrap goclang/base:${LLVM_VERSION} make test
docker container run --rm -it --mount type=bind,src=$(CURDIR),dst=/go/src/github.com/go-clang/bootstrap -w /go/src/github.com/go-clang/bootstrap ghcr.io/go-clang/base:${LLVM_VERSION} make test
2 changes: 1 addition & 1 deletion clang/accessspecifier_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (as AccessSpecifier) Spelling() string {
return "AccessSpecifier=Private"
}

return fmt.Sprintf("AccessSpecifier unkown %d", int(as))
return fmt.Sprintf("AccessSpecifier unknown %d", int(as))
}

func (as AccessSpecifier) String() string {
Expand Down
2 changes: 1 addition & 1 deletion clang/availabilitykind_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (ak AvailabilityKind) Spelling() string {
return "Availability=NotAccessible"
}

return fmt.Sprintf("AvailabilityKind unkown %d", int(ak))
return fmt.Sprintf("AvailabilityKind unknown %d", int(ak))
}

func (ak AvailabilityKind) String() string {
Expand Down
7 changes: 4 additions & 3 deletions clang/callingconv_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const (
CallingConv_AAPCS_VFP = C.CXCallingConv_AAPCS_VFP
CallingConv_X86RegCall = C.CXCallingConv_X86RegCall
CallingConv_IntelOclBicc = C.CXCallingConv_IntelOclBicc
CallingConv_Win64 = C.CXCallingConv_Win64
CallingConv_X86_64Win64 = C.CXCallingConv_X86_64Win64
CallingConv_X86_64SysV = C.CXCallingConv_X86_64SysV
CallingConv_X86VectorCall = C.CXCallingConv_X86VectorCall
Expand Down Expand Up @@ -51,8 +52,8 @@ func (cc CallingConv) Spelling() string {
return "CallingConv=X86RegCall"
case CallingConv_IntelOclBicc:
return "CallingConv=IntelOclBicc"
case CallingConv_X86_64Win64:
return "CallingConv=X86_64Win64"
case CallingConv_Win64:
return "CallingConv=Win64, X86_64Win64"
case CallingConv_X86_64SysV:
return "CallingConv=X86_64SysV"
case CallingConv_X86VectorCall:
Expand All @@ -69,7 +70,7 @@ func (cc CallingConv) Spelling() string {
return "CallingConv=Unexposed"
}

return fmt.Sprintf("CallingConv unkown %d", int(cc))
return fmt.Sprintf("CallingConv unknown %d", int(cc))
}

func (cc CallingConv) String() string {
Expand Down
2 changes: 1 addition & 1 deletion clang/childvisitresult_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (cvr ChildVisitResult) Spelling() string {
return "ChildVisit=Recurse"
}

return fmt.Sprintf("ChildVisitResult unkown %d", int(cvr))
return fmt.Sprintf("ChildVisitResult unknown %d", int(cvr))
}

func (cvr ChildVisitResult) String() string {
Expand Down
2 changes: 1 addition & 1 deletion clang/clang-c/CXCompilationDatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
|* *|
|*===----------------------------------------------------------------------===*|
|* *|
|* This header provides a public inferface to use CompilationDatabase without *|
|* This header provides a public interface to use CompilationDatabase without *|
|* the full Clang C++ API. *|
|* *|
\*===----------------------------------------------------------------------===*/
Expand Down
Loading

0 comments on commit 3a02f4a

Please sign in to comment.