diff options
| author | Fangrui Song <maskray@google.com> | 2018-03-08 01:28:45 +0000 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2018-03-08 01:28:45 +0000 |
| commit | 63444f824d9ee4471d4c7aab476ccd42481c39ca (patch) | |
| tree | 51e0e50450ba4d66f0d5055b9d354c22295a4e40 | |
| parent | e66d7a798f183b83305ac13524ea506cdcd5ec9f (diff) | |
| download | bcm5719-llvm-63444f824d9ee4471d4c7aab476ccd42481c39ca.tar.gz bcm5719-llvm-63444f824d9ee4471d4c7aab476ccd42481c39ca.zip | |
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
llvm-svn: 326978
| -rw-r--r-- | llvm/utils/emacs/llvm-mode.el | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/llvm/utils/emacs/llvm-mode.el b/llvm/utils/emacs/llvm-mode.el index b27954acfbe..95c7f3c0c6d 100644 --- a/llvm/utils/emacs/llvm-mode.el +++ b/llvm/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) |

