3 " Maintainer: The LLVM team, http://llvm.org/
8 elseif exists("b:current_syntax")
14 " MIR is embedded in a yaml container, so we load all of the yaml syntax.
15 runtime! syntax/yaml.vim
16 unlet b:current_syntax
18 " The first document of a file is allowed to contain an LLVM IR module inside
19 " a top-level yaml block string.
20 syntax include @LLVM syntax/llvm.vim
21 " FIXME: This should only be allowed for the first document of the file
22 syntax region llvm start=/\(^---\s*|\)\@<=/ end=/\(^\.\.\.\)\@=/ contains=@LLVM
24 " The `body:` field of a document contains the MIR dump of the function
25 syntax include @MIR syntax/machine-ir.vim
26 syntax region mir start=/\(^body:\s*|\)\@<=/ end=/\(^[^[:space:]]\)\@=/ contains=@MIR
28 " Syntax-highlight lit test commands and bug numbers.
29 syn match mirSpecialComment /#\s*PR\d*\s*$/
30 syn match mirSpecialComment /#\s*REQUIRES:.*$/
31 syn match mirSpecialComment /#\s*RUN:.*$/
32 syn match mirSpecialComment /#\s*ALLOW_RETRIES:.*$/
33 syn match mirSpecialComment /#\s*CHECK:.*$/
34 syn match mirSpecialComment "\v#\s*CHECK-(NEXT|NOT|DAG|SAME|LABEL):.*$"
35 syn match mirSpecialComment /#\s*XFAIL:.*$/
37 if version >= 508 || !exists("did_c_syn_inits")
39 let did_c_syn_inits = 1
40 command -nargs=+ HiLink hi link <args>
42 command -nargs=+ HiLink hi def link <args>
45 HiLink mirSpecialComment SpecialComment
50 let b:current_syntax = "mir"