[llvm] [RemoveDIs] Update syntax highlighting to include debug records (PR #93660)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 02:56:16 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-debuginfo
Author: Stephen Tozer (SLTozer)
<details>
<summary>Changes</summary>
This patch updates the vim and vscode syntax highlighters to recognize debug records. I wasn't able to build the vscode extensions locally, so I've only tested this pattern by checking that the pattern works in vscode search.
---
Full diff: https://github.com/llvm/llvm-project/pull/93660.diff
2 Files Affected:
- (modified) llvm/utils/vim/syntax/llvm.vim (+3)
- (modified) llvm/utils/vscode/llvm/syntaxes/ll.tmLanguage.yaml (+2-1)
``````````diff
diff --git a/llvm/utils/vim/syntax/llvm.vim b/llvm/utils/vim/syntax/llvm.vim
index d86e3d1ddbc27..c45391477f2c2 100644
--- a/llvm/utils/vim/syntax/llvm.vim
+++ b/llvm/utils/vim/syntax/llvm.vim
@@ -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
diff --git a/llvm/utils/vscode/llvm/syntaxes/ll.tmLanguage.yaml b/llvm/utils/vscode/llvm/syntaxes/ll.tmLanguage.yaml
index d80c3778bbe78..da07491c9d88d 100644
--- a/llvm/utils/vscode/llvm/syntaxes/ll.tmLanguage.yaml
+++ b/llvm/utils/vscode/llvm/syntaxes/ll.tmLanguage.yaml
@@ -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|\
``````````
</details>
https://github.com/llvm/llvm-project/pull/93660
More information about the llvm-commits
mailing list