[llvm] [emacs] More consistently highlight value keywords that appear in vectors (PR #97594)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 3 08:44:17 PDT 2024
https://github.com/goldsteinn created https://github.com/llvm/llvm-project/pull/97594
Previously something like `<i8 123, i8 poison>` would not properly
highlight the `poison` keyword at the end.
>From de02c294d1d66a5769545642daf9a87ea7a1bd91 Mon Sep 17 00:00:00 2001
From: Noah Goldstein <goldstein.w.n at gmail.com>
Date: Wed, 3 Jul 2024 23:19:37 +0800
Subject: [PATCH] [emacs] More consistently highlight value keywords that
appear in vectors
Previously something like `<i8 123, i8 poison>` would not properly
highlight the `poison` keyword at the end.
---
llvm/utils/emacs/llvm-mode.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/llvm/utils/emacs/llvm-mode.el b/llvm/utils/emacs/llvm-mode.el
index 4d7c425780eb8..43807502f309a 100644
--- a/llvm/utils/emacs/llvm-mode.el
+++ b/llvm/utils/emacs/llvm-mode.el
@@ -61,6 +61,8 @@
`(,(concat "\\<" llvm-mode-primitive-type-regexp "\\>") . font-lock-type-face)
;; Integer literals
'("\\b[-]?[0-9]+\\b" . font-lock-preprocessor-face)
+ ;; Values that can appear in a vec
+ '("\\b\\(true\\|false\\|null\\|undef\\|poison\\)\\b" . font-lock-keyword-face)
;; Floating point constants
'("\\b[-+]?[0-9]+.[0-9]*\\([eE][-+]?[0-9]+\\)?\\b" . font-lock-preprocessor-face)
;; Hex constants
@@ -74,7 +76,7 @@
"private" "internal" "weak" "weak_odr" "linkonce" "linkonce_odr" "available_externally" "appending" "common" "extern_weak" "external"
"uninitialized" "implementation" "..."
;; Values
- "true" "false" "null" "undef" "zeroinitializer" "none" "c" "asm" "blockaddress" "poison"
+ "zeroinitializer" "c" "asm" "blockaddress"
;; Calling conventions
"ccc" "fastcc" "coldcc" "anyregcc" "preserve_mostcc" "preserve_allcc"
More information about the llvm-commits
mailing list