[PATCH] D44135: Add attributes and fix some keywords in llvm-mode.el
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 5 23:10:32 PST 2018
MaskRay created this revision.
MaskRay added a reviewer: rafael.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D44135
Files:
utils/emacs/llvm-mode.el
Index: utils/emacs/llvm-mode.el
===================================================================
--- utils/emacs/llvm-mode.el
+++ utils/emacs/llvm-mode.el
@@ -20,6 +20,14 @@
(defvar llvm-font-lock-keywords
(list
+ ;; Attributes
+ `(,(regexp-opt
+ '("alwaysinline" "argmemonly" "builtin" "cold" "convergent" "inaccessiblememonly"
+ "inaccessiblemem_or_argmemonly" "inlinehint" "jumptable" "minsize" "naked" "nobuiltin"
+ "noduplicate" "noimplicitfloat" "noinline" "nonlazybind" "noredzone" "noreturn"
+ "norecurse" "nounwind" "optnone" "optsize" "readnone" "readonly" "returns_twice"
+ "speculatable" "ssp" "sspreq" "sspstrong" "safestack" "sanitize_address" "sanitize_hwaddress"
+ "sanitize_thread" "sanitize_memory" "strictfp" "uwtable" "writeonly") 'symbols) . font-lock-constant-face)
;; Variables
'("%[-a-zA-Z$._][-a-zA-Z$._0-9]*" . font-lock-variable-name-face)
;; Labels
@@ -35,11 +43,21 @@
;; Hex constants
'("\\b0x[0-9A-Fa-f]+\\b" . font-lock-preprocessor-face)
;; Keywords
- `(,(regexp-opt '("begin" "end" "true" "false" "zeroinitializer" "declare"
- "define" "global" "constant" "const" "internal" "linkonce" "linkonce_odr"
- "weak" "weak_odr" "appending" "uninitialized" "implementation" "..."
- "null" "undef" "to" "except" "not" "target" "endian" "little" "big"
- "pointersize" "volatile" "fastcc" "coldcc" "cc" "personality") 'symbols) . font-lock-keyword-face)
+ `(,(regexp-opt
+ '(;; Toplevel entities
+ "declare" "define" "module" "target" "source_filename" "global" "constant" "const"
+ "attributes" "uselistorder" "uselistorder_bb"
+ ;; Linkage types
+ "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"
+
+ ;; Calling conventions
+ "ccc" "fastcc" "coldcc" "webkit_jscc" "anyregcc" "preserve_mostcc" "preserve_allcc"
+ "cxx_fast_tlscc" "swiftcc"
+
+ "atomic" "volatile" "personality" "prologue" "section") 'symbols) . font-lock-keyword-face)
;; Arithmetic and Logical Operators
`(,(regexp-opt '("add" "sub" "mul" "sdiv" "udiv" "urem" "srem" "and" "or" "xor"
"setne" "seteq" "setlt" "setgt" "setle" "setge") 'symbols) . font-lock-keyword-face)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44135.137129.patch
Type: text/x-patch
Size: 2566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180306/61468e35/attachment.bin>
More information about the llvm-commits
mailing list