Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm15: regenerate parser for LLVM 15.0 (rc1) #12

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
360 changes: 102 additions & 258 deletions ast/ast.go

Large diffs are not rendered by default.

40 changes: 14 additions & 26 deletions ast/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ func ToLlvmNode(n *Node) LlvmNode {
return &AlignStackPair{n}
case ll.AlignStackTok:
return &AlignStackTok{n}
case ll.AllocKind:
return &AllocKind{n}
case ll.AllocSize:
return &AllocSize{n}
case ll.AllocaInst:
Expand Down Expand Up @@ -312,24 +314,16 @@ func ToLlvmNode(n *Node) LlvmNode {
return &ExtractElementExpr{n}
case ll.ExtractElementInst:
return &ExtractElementInst{n}
case ll.ExtractValueExpr:
return &ExtractValueExpr{n}
case ll.ExtractValueInst:
return &ExtractValueInst{n}
case ll.FAddExpr:
return &FAddExpr{n}
case ll.FAddInst:
return &FAddInst{n}
case ll.FCmpExpr:
return &FCmpExpr{n}
case ll.FCmpInst:
return &FCmpInst{n}
case ll.FDivExpr:
return &FDivExpr{n}
case ll.FDivInst:
return &FDivInst{n}
case ll.FMulExpr:
return &FMulExpr{n}
case ll.FMulInst:
return &FMulInst{n}
case ll.FNegExpr:
Expand All @@ -354,12 +348,8 @@ func ToLlvmNode(n *Node) LlvmNode {
return &FPTruncInst{n}
case ll.FPred:
return &FPred{n}
case ll.FRemExpr:
return &FRemExpr{n}
case ll.FRemInst:
return &FRemInst{n}
case ll.FSubExpr:
return &FSubExpr{n}
case ll.FSubInst:
return &FSubInst{n}
case ll.FastMathFlag:
Expand Down Expand Up @@ -456,8 +446,6 @@ func ToLlvmNode(n *Node) LlvmNode {
return &InsertElementExpr{n}
case ll.InsertElementInst:
return &InsertElementInst{n}
case ll.InsertValueExpr:
return &InsertValueExpr{n}
case ll.InsertValueInst:
return &InsertValueInst{n}
case ll.IntConst:
Expand Down Expand Up @@ -630,8 +618,6 @@ func ToLlvmNode(n *Node) LlvmNode {
return &RuntimeVersionField{n}
case ll.SDKField:
return &SDKField{n}
case ll.SDivExpr:
return &SDivExpr{n}
case ll.SDivInst:
return &SDivInst{n}
case ll.SExtExpr:
Expand All @@ -644,10 +630,10 @@ func ToLlvmNode(n *Node) LlvmNode {
return &SIToFPInst{n}
case ll.SPFlagsField:
return &SPFlagsField{n}
case ll.SRemExpr:
return &SRemExpr{n}
case ll.SRemInst:
return &SRemInst{n}
case ll.SanitizerKind:
return &SanitizerKind{n}
case ll.ScalableVectorType:
return &ScalableVectorType{n}
case ll.ScopeField:
Expand Down Expand Up @@ -722,6 +708,8 @@ func ToLlvmNode(n *Node) LlvmNode {
return &Tail{n}
case ll.TargetDataLayout:
return &TargetDataLayout{n}
case ll.TargetFuncNameField:
return &TargetFuncNameField{n}
case ll.TargetTriple:
return &TargetTriple{n}
case ll.TemplateParamsField:
Expand Down Expand Up @@ -750,16 +738,12 @@ func ToLlvmNode(n *Node) LlvmNode {
return &TypeValue{n}
case ll.TypesField:
return &TypesField{n}
case ll.UDivExpr:
return &UDivExpr{n}
case ll.UDivInst:
return &UDivInst{n}
case ll.UIToFPExpr:
return &UIToFPExpr{n}
case ll.UIToFPInst:
return &UIToFPInst{n}
case ll.URemExpr:
return &URemExpr{n}
case ll.URemInst:
return &URemInst{n}
case ll.UintLit:
Expand All @@ -774,6 +758,10 @@ func ToLlvmNode(n *Node) LlvmNode {
return &UnreachableTerm{n}
case ll.Unwind:
return &Unwind{n}
case ll.UnwindTable:
return &UnwindTable{n}
case ll.UnwindTableKind:
return &UnwindTableKind{n}
case ll.UnwindToCaller:
return &UnwindToCaller{n}
case ll.UpperBoundField:
Expand All @@ -784,10 +772,6 @@ func ToLlvmNode(n *Node) LlvmNode {
return &UseListOrderBB{n}
case ll.VAArgInst:
return &VAArgInst{n}
case ll.VScaleRange:
return &VScaleRange{n}
case ll.VScaleRangetok:
return &VScaleRangetok{n}
case ll.ValueField:
return &ValueField{n}
case ll.ValueIntField:
Expand All @@ -798,6 +782,10 @@ func ToLlvmNode(n *Node) LlvmNode {
return &VarField{n}
case ll.VectorConst:
return &VectorConst{n}
case ll.VectorScaleRange:
return &VectorScaleRange{n}
case ll.VectorScaleRangetok:
return &VectorScaleRangetok{n}
case ll.VectorType:
return &VectorType{n}
case ll.VirtualIndexField:
Expand Down
2 changes: 1 addition & 1 deletion grammar
Submodule grammar updated 1 files
+78 −124 ll.tm
4 changes: 4 additions & 0 deletions lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ recovered:
token = DEFAULTEDCOLON
break
}
if hash == 0x77bfc01a && "targetFuncName:" == l.source[l.tokenOffset:l.offset] {
token = TARGETFUNCNAMECOLON
break
}
if hash == 0x7e83e59a && "templateParams:" == l.source[l.tokenOffset:l.offset] {
token = TEMPLATEPARAMSCOLON
break
Expand Down
27,474 changes: 14,033 additions & 13,441 deletions lexer_tables.go

Large diffs are not rendered by default.

Loading