[RemoveDIs] Update syntax highlighting to include debug records (#93660)

This patch updates the emacs, vim, and vscode syntax highlighters to
recognize debug records.
This commit is contained in:
Stephen Tozer 2024-05-30 12:17:37 +01:00 committed by GitHub
parent 22c572eae0
commit 2705c605da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 1 deletions

View File

@ -87,6 +87,8 @@
`(,(regexp-opt '("extractvalue" "insertvalue") 'symbols) . font-lock-keyword-face)
;; Metadata types
`(,(regexp-opt '("distinct") 'symbols) . font-lock-keyword-face)
;; Debug records
`(,(concat "#" (regexp-opt '("dbg_assign" "dbg_declare" "dbg_label" "dbg_value") 'symbols)) . font-lock-keyword-face)
;; Atomic memory ordering constraints
`(,(regexp-opt '("unordered" "monotonic" "acquire" "release" "acq_rel" "seq_cst") 'symbols) . font-lock-keyword-face)
;; Fast-math flags

View File

@ -36,6 +36,9 @@ syn keyword llvmStatement sle slt srem store sub switch trunc udiv ueq uge ugt
syn keyword llvmStatement uitofp ule ult umax umin une uno unreachable unwind
syn keyword llvmStatement urem va_arg xchg xor zext
" Debug records.
syn match llvmStatement /\v#dbg_(assign|declare|label|value)/
" Keywords.
syn keyword llvmKeyword
\ acq_rel

View File

@ -34,7 +34,8 @@ patterns:
captures:
1:
name: storage.type.llvm
- match: "\\badd\\b|\
- match: "(?<=\\s|^)#dbg_(assign|declare|label|value)\\b|\
\\badd\\b|\
\\baddrspacecast\\b|\
\\balloca\\b|\
\\band\\b|\