llvm.org GIT mirror llvm / a385fd7
Add attributes and fix some keywords in llvm-mode.el Reviewers: rafael, echristo Reviewed By: echristo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44135 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326978 91177308-0d34-0410-b5e6-96231b3b80d8 Fangrui Song 2 years ago
1 changed file(s) with 23 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
1919
2020 (defvar llvm-font-lock-keywords
2121 (list
22 ;; Attributes
23 `(,(regexp-opt
24 '("alwaysinline" "argmemonly" "builtin" "cold" "convergent" "inaccessiblememonly"
25 "inaccessiblemem_or_argmemonly" "inlinehint" "jumptable" "minsize" "naked" "nobuiltin"
26 "noduplicate" "noimplicitfloat" "noinline" "nonlazybind" "noredzone" "noreturn"
27 "norecurse" "nounwind" "optnone" "optsize" "readnone" "readonly" "returns_twice"
28 "speculatable" "ssp" "sspreq" "sspstrong" "safestack" "sanitize_address" "sanitize_hwaddress"
29 "sanitize_thread" "sanitize_memory" "strictfp" "uwtable" "writeonly") 'symbols) . font-lock-constant-face)
2230 ;; Variables
2331 '("%[-a-zA-Z$._][-a-zA-Z$._0-9]*" . font-lock-variable-name-face)
2432 ;; Labels
3442 ;; Hex constants
3543 '("\\b0x[0-9A-Fa-f]+\\b" . font-lock-preprocessor-face)
3644 ;; Keywords
37 `(,(regexp-opt '("begin" "end" "true" "false" "zeroinitializer" "declare"
38 "define" "global" "constant" "const" "internal" "linkonce" "linkonce_odr"
39 "weak" "weak_odr" "appending" "uninitialized" "implementation" "..."
40 "null" "undef" "to" "except" "not" "target" "endian" "little" "big"
41 "pointersize" "volatile" "fastcc" "coldcc" "cc" "personality") 'symbols) . font-lock-keyword-face)
45 `(,(regexp-opt
46 '(;; Toplevel entities
47 "declare" "define" "module" "target" "source_filename" "global" "constant" "const"
48 "attributes" "uselistorder" "uselistorder_bb"
49 ;; Linkage types
50 "private" "internal" "weak" "weak_odr" "linkonce" "linkonce_odr" "available_externally" "appending" "common" "extern_weak" "external"
51 "uninitialized" "implementation" "..."
52 ;; Values
53 "true" "false" "null" "undef" "zeroinitializer" "none" "c" "asm" "blockaddress"
54
55 ;; Calling conventions
56 "ccc" "fastcc" "coldcc" "webkit_jscc" "anyregcc" "preserve_mostcc" "preserve_allcc"
57 "cxx_fast_tlscc" "swiftcc"
58
59 "atomic" "volatile" "personality" "prologue" "section") 'symbols) . font-lock-keyword-face)
4260 ;; Arithmetic and Logical Operators
4361 `(,(regexp-opt '("add" "sub" "mul" "sdiv" "udiv" "urem" "srem" "and" "or" "xor"
4462 "setne" "seteq" "setlt" "setgt" "setle" "setge") 'symbols) . font-lock-keyword-face)