1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[Utils] Add missing attributes in syntax files

Added the following attributes to all LLVM syntax files:
  * allocsize
  * cold
  * convergent
  * dereferenceable_or_null
  * hot
  * inaccessiblemem_or_argmemonly
  * inaccessiblememonly
  * inalloca
  * jumptable
  * nocallback
  * nocf_check
  * noduplicate
  * nofree
  * nomerge
  * noprofile
  * nosync
  * null_pointer_is_valid
  * optforfuzzing
  * preallocated
  * safestack
  * sanitize_hwaddress
  * sanitize_memtag
  * shadowcallstack
  * speculative_load_hardening
  * swifterror
  * syncscope
  * tailcc
  * willreturn

I generated that list by comparing:
  * Attributes.inc (generated from Attributes.td), and
  * the Vim syntax file: llvm/utils/vim/syntax/llvm.vim

My original intention was to focus on the Vim syntax file. Since other
syntax files are also out-of-date, I added these attributes (if missing)
to other files as well. Note that in the other sytnax files (i.e. for
Emacs, VScode and Kate), there will be other attributes missing too.

I've also sorted all attributes alphabetically. Otherwise it's really
hard to automate adding new attributes. And I think that it was the
original intent to keep all of them ordered alphabetically.

Differential Revision: https://reviews.llvm.org/D97627
This commit is contained in:
Andrzej Warzynski 2021-03-05 17:36:09 +00:00
parent f00c577e2d
commit bed7df6e8b
4 changed files with 110 additions and 24 deletions

View File

@ -22,12 +22,12 @@
(list (list
;; Attributes ;; Attributes
`(,(regexp-opt `(,(regexp-opt
'("alwaysinline" "argmemonly" "builtin" "cold" "convergent" "inaccessiblememonly" '("alwaysinline" "argmemonly" "allocsize" "builtin" "cold" "convergent" "dereferenceable_or_null" "hot" "inaccessiblememonly"
"inaccessiblemem_or_argmemonly" "inlinehint" "jumptable" "minsize" "mustprogress" "naked" "nobuiltin" "inaccessiblemem_or_argmemonly" "inalloca" "inlinehint" "jumptable" "minsize" "mustprogress" "naked" "nobuiltin"
"noduplicate" "nofree" "noimplicitfloat" "noinline" "nonlazybind" "noredzone" "noreturn" "nocallback" "nocf_check" "noduplicate" "nofree" "noimplicitfloat" "noinline" "nomerge" "nonlazybind" "noprofile" "noredzone" "noreturn"
"norecurse" "noundef" "nounwind" "optnone" "optsize" "readnone" "readonly" "returns_twice" "norecurse" "nosync" "noundef" "nounwind" "null_pointer_is_valid" "optforfuzzing" "optnone" "optsize" "preallocated" "readnone" "readonly" "returns_twice"
"speculatable" "ssp" "sspreq" "sspstrong" "safestack" "sanitize_address" "sanitize_hwaddress" "sanitize_memtag" "shadowcallstack" "speculatable" "speculative_load_hardening" "ssp" "sspreq" "sspstrong" "safestack" "sanitize_address" "sanitize_hwaddress" "sanitize_memtag"
"sanitize_thread" "sanitize_memory" "strictfp" "uwtable" "willreturn" "writeonly" "immarg") 'symbols) . font-lock-constant-face) "sanitize_thread" "sanitize_memory" "strictfp" "swifterror" "uwtable" "willreturn" "writeonly" "immarg") 'symbols) . font-lock-constant-face)
;; Variables ;; Variables
'("%[-a-zA-Z$._][-a-zA-Z$._0-9]*" . font-lock-variable-name-face) '("%[-a-zA-Z$._][-a-zA-Z$._0-9]*" . font-lock-variable-name-face)
;; Labels ;; Labels

View File

@ -77,25 +77,59 @@
</list> </list>
<list name="function-attributes"> <list name="function-attributes">
<item> alignstack </item> <item> alignstack </item>
<item> allocsize </item>
<item> alwaysinline </item> <item> alwaysinline </item>
<item> argmemonly </item> <item> argmemonly </item>
<item> arm_aapcscc </item>
<item> catch </item>
<item> cold </item>
<item> convergent </item> <item> convergent </item>
<item> dereferenceable_or_null </item>
<item> extern_weak </item>
<item> hhvmcc </item>
<item> hot </item>
<item> inaccessiblemem_or_argmemonly </item>
<item> inaccessiblememonly </item>
<item> inalloca </item>
<item> inlinehint </item> <item> inlinehint </item>
<item> inteldialect </item>
<item> jumptable </item>
<item> local_unnamed_addr </item>
<item> mustprogress </item> <item> mustprogress </item>
<item> naked </item> <item> naked </item>
<item> nobuiltin </item> <item> nobuiltin </item>
<item> nocallback </item>
<item> nocf_check </item>
<item> noduplicate </item>
<item> nofree </item>
<item> noimplicitfloat </item> <item> noimplicitfloat </item>
<item> noinline </item> <item> noinline </item>
<item> nomerge </item>
<item> noprofile </item>
<item> noredzone </item> <item> noredzone </item>
<item> noreturn </item> <item> noreturn </item>
<item> nosync </item>
<item> nounwind </item> <item> nounwind </item>
<item> null_pointer_is_valid </item>
<item> optforfuzzing </item>
<item> optnone </item> <item> optnone </item>
<item> optsize </item> <item> optsize </item>
<item> preallocated </item>
<item> readnone </item> <item> readnone </item>
<item> readonly </item> <item> readonly </item>
<item> safestack </item>
<item> sanitize_hwaddress </item>
<item> sanitize_memtag </item>
<item> shadowcallstack </item>
<item> speculative_load_hardening </item>
<item> ssp </item> <item> ssp </item>
<item> sspreq </item> <item> sspreq </item>
<item> sspstrong </item> <item> sspstrong </item>
<item> swifterror </item>
<item> syncscope </item>
<item> tailcc </item>
<item> willreturn </item>
<item> willreturn </item>
</list> </list>
<list name="types"> <list name="types">
<item> addrspace </item> <item> addrspace </item>

View File

@ -44,11 +44,12 @@ syn keyword llvmKeyword
\ alias \ alias
\ align \ align
\ alignstack \ alignstack
\ allocsize
\ alwaysinline \ alwaysinline
\ appending \ appending
\ argmemonly \ argmemonly
\ arm_aapcscc
\ arm_aapcs_vfpcc \ arm_aapcs_vfpcc
\ arm_aapcscc
\ arm_apcscc \ arm_apcscc
\ asm \ asm
\ atomic \ atomic
@ -58,51 +59,58 @@ syn keyword llvmKeyword
\ byref \ byref
\ byval \ byval
\ c \ c
\ catch
\ caller \ caller
\ catch
\ cc \ cc
\ ccc \ ccc
\ cleanup \ cleanup
\ cold
\ coldcc \ coldcc
\ comdat \ comdat
\ common \ common
\ constant \ constant
\ convergent
\ datalayout \ datalayout
\ declare \ declare
\ default \ default
\ define \ define
\ deplibs \ deplibs
\ dereferenceable \ dereferenceable
\ dereferenceable_or_null
\ distinct \ distinct
\ dllexport \ dllexport
\ dllimport \ dllimport
\ dso_local \ dso_local
\ dso_preemptable \ dso_preemptable
\ except \ except
\ extern_weak
\ external \ external
\ externally_initialized \ externally_initialized
\ extern_weak
\ fastcc \ fastcc
\ tailcc
\ filter \ filter
\ from \ from
\ gc \ gc
\ global \ global
\ hhvmcc
\ hhvm_ccc \ hhvm_ccc
\ hhvmcc
\ hidden \ hidden
\ hot
\ immarg \ immarg
\ inaccessiblemem_or_argmemonly
\ inaccessiblememonly
\ inalloca
\ initialexec \ initialexec
\ inlinehint \ inlinehint
\ inreg \ inreg
\ inteldialect
\ intel_ocl_bicc \ intel_ocl_bicc
\ inteldialect
\ internal \ internal
\ jumptable
\ linkonce \ linkonce
\ linkonce_odr \ linkonce_odr
\ local_unnamed_addr
\ localdynamic \ localdynamic
\ localexec \ localexec
\ local_unnamed_addr
\ minsize \ minsize
\ module \ module
\ monotonic \ monotonic
@ -113,19 +121,29 @@ syn keyword llvmKeyword
\ nest \ nest
\ noalias \ noalias
\ nobuiltin \ nobuiltin
\ nocallback
\ nocapture \ nocapture
\ nocf_check
\ noduplicate
\ nofree
\ noimplicitfloat \ noimplicitfloat
\ noinline \ noinline
\ nomerge
\ nonlazybind \ nonlazybind
\ nonnull \ nonnull
\ noprofile
\ norecurse \ norecurse
\ noredzone \ noredzone
\ noreturn \ noreturn
\ nosync
\ noundef \ noundef
\ nounwind \ nounwind
\ null_pointer_is_valid
\ optforfuzzing
\ optnone \ optnone
\ optsize \ optsize
\ personality \ personality
\ preallocated
\ private \ private
\ protected \ protected
\ ptx_device \ ptx_device
@ -135,16 +153,20 @@ syn keyword llvmKeyword
\ release \ release
\ returned \ returned
\ returns_twice \ returns_twice
\ safestack
\ sanitize_address \ sanitize_address
\ sanitize_hwaddress
\ sanitize_memory \ sanitize_memory
\ sanitize_memtag
\ sanitize_thread \ sanitize_thread
\ section \ section
\ seq_cst \ seq_cst
\ shadowcallstack
\ sideeffect \ sideeffect
\ signext \ signext
\ syncscope
\ source_filename \ source_filename
\ speculatable \ speculatable
\ speculative_load_hardening
\ spir_func \ spir_func
\ spir_kernel \ spir_kernel
\ sret \ sret
@ -153,8 +175,11 @@ syn keyword llvmKeyword
\ sspstrong \ sspstrong
\ strictfp \ strictfp
\ swiftcc \ swiftcc
\ swifterror
\ swiftself \ swiftself
\ syncscope
\ tail \ tail
\ tailcc
\ target \ target
\ thread_local \ thread_local
\ to \ to
@ -167,10 +192,11 @@ syn keyword llvmKeyword
\ volatile \ volatile
\ weak \ weak
\ weak_odr \ weak_odr
\ willreturn
\ win64cc
\ within \ within
\ writeonly \ writeonly
\ x86_64_sysvcc \ x86_64_sysvcc
\ win64cc
\ x86_fastcallcc \ x86_fastcallcc
\ x86_stdcallcc \ x86_stdcallcc
\ x86_thiscallcc \ x86_thiscallcc

View File

@ -143,11 +143,12 @@ patterns:
\\balias\\b|\ \\balias\\b|\
\\balign\\b|\ \\balign\\b|\
\\balignstack\\b|\ \\balignstack\\b|\
\\ballocsize\\b|\
\\balwaysinline\\b|\ \\balwaysinline\\b|\
\\bappending\\b|\ \\bappending\\b|\
\\bargmemonly\\b|\ \\bargmemonly\\b|\
\\barm_aapcscc\\b|\
\\barm_aapcs_vfpcc\\b|\ \\barm_aapcs_vfpcc\\b|\
\\barm_aapcscc\\b|\
\\barm_apcscc\\b|\ \\barm_apcscc\\b|\
\\basm\\b|\ \\basm\\b|\
\\batomic\\b|\ \\batomic\\b|\
@ -157,51 +158,58 @@ patterns:
\\bbyref\\b|\ \\bbyref\\b|\
\\bbyval\\b|\ \\bbyval\\b|\
\\bc\\b|\ \\bc\\b|\
\\bcatch\\b|\
\\bcaller\\b|\ \\bcaller\\b|\
\\bcatch\\b|\
\\bcc\\b|\ \\bcc\\b|\
\\bccc\\b|\ \\bccc\\b|\
\\bcleanup\\b|\ \\bcleanup\\b|\
\\bcold\\b|\
\\bcoldcc\\b|\ \\bcoldcc\\b|\
\\bcomdat\\b|\ \\bcomdat\\b|\
\\bcommon\\b|\ \\bcommon\\b|\
\\bconstant\\b|\ \\bconstant\\b|\
\\bconvergent\\b|\
\\bdatalayout\\b|\ \\bdatalayout\\b|\
\\bdeclare\\b|\ \\bdeclare\\b|\
\\bdefault\\b|\ \\bdefault\\b|\
\\bdefine\\b|\ \\bdefine\\b|\
\\bdeplibs\\b|\ \\bdeplibs\\b|\
\\bdereferenceable\\b|\ \\bdereferenceable\\b|\
\\bdereferenceable_or_null\\b|\
\\bdistinct\\b|\ \\bdistinct\\b|\
\\bdllexport\\b|\ \\bdllexport\\b|\
\\bdllimport\\b|\ \\bdllimport\\b|\
\\bdso_local\\b|\ \\bdso_local\\b|\
\\bdso_preemptable\\b|\ \\bdso_preemptable\\b|\
\\bexcept\\b|\ \\bexcept\\b|\
\\bextern_weak\\b|\
\\bexternal\\b|\ \\bexternal\\b|\
\\bexternally_initialized\\b|\ \\bexternally_initialized\\b|\
\\bextern_weak\\b|\
\\bfastcc\\b|\ \\bfastcc\\b|\
\\btailcc\\b|\
\\bfilter\\b|\ \\bfilter\\b|\
\\bfrom\\b|\ \\bfrom\\b|\
\\bgc\\b|\ \\bgc\\b|\
\\bglobal\\b|\ \\bglobal\\b|\
\\bhhvmcc\\b|\
\\bhhvm_ccc\\b|\ \\bhhvm_ccc\\b|\
\\bhhvmcc\\b|\
\\bhidden\\b|\ \\bhidden\\b|\
\\bhot\\b|\
\\bimmarg\\b|\ \\bimmarg\\b|\
\\binaccessiblemem_or_argmemonly\\b|\
\\binaccessiblememonly\\b|\
\\binalloc\\b|\
\\binitialexec\\b|\ \\binitialexec\\b|\
\\binlinehint\\b|\ \\binlinehint\\b|\
\\binreg\\b|\ \\binreg\\b|\
\\binteldialect\\b|\
\\bintel_ocl_bicc\\b|\ \\bintel_ocl_bicc\\b|\
\\binteldialect\\b|\
\\binternal\\b|\ \\binternal\\b|\
\\bjumptable\\b|\
\\blinkonce\\b|\ \\blinkonce\\b|\
\\blinkonce_odr\\b|\ \\blinkonce_odr\\b|\
\\blocal_unnamed_addr\\b|\
\\blocaldynamic\\b|\ \\blocaldynamic\\b|\
\\blocalexec\\b|\ \\blocalexec\\b|\
\\blocal_unnamed_addr\\b|\
\\bminsize\\b|\ \\bminsize\\b|\
\\bmodule\\b|\ \\bmodule\\b|\
\\bmonotonic\\b|\ \\bmonotonic\\b|\
@ -212,19 +220,29 @@ patterns:
\\bnest\\b|\ \\bnest\\b|\
\\bnoalias\\b|\ \\bnoalias\\b|\
\\bnobuiltin\\b|\ \\bnobuiltin\\b|\
\\bnocallback\\b|\
\\bnocapture\\b|\ \\bnocapture\\b|\
\\bnocf_check\\b|\
\\bnoduplicate\\b|\
\\bnofree\\b|\
\\bnoimplicitfloat\\b|\ \\bnoimplicitfloat\\b|\
\\bnoinline\\b|\ \\bnoinline\\b|\
\\bnomerge\\b|\
\\bnonlazybind\\b|\ \\bnonlazybind\\b|\
\\bnonnull\\b|\ \\bnonnull\\b|\
\\bnoprofile\\b|\
\\bnorecurse\\b|\ \\bnorecurse\\b|\
\\bnoredzone\\b|\ \\bnoredzone\\b|\
\\bnoreturn\\b|\ \\bnoreturn\\b|\
\\bnosync\\b|\
\\bnoundef\\b|\ \\bnoundef\\b|\
\\bnounwind\\b|\ \\bnounwind\\b|\
\\bnull_pointer_is_valid\\b|\
\\boptforfuzzing\\b|\
\\boptnone\\b|\ \\boptnone\\b|\
\\boptsize\\b|\ \\boptsize\\b|\
\\bpersonality\\b|\ \\bpersonality\\b|\
\\bpreallocated\\b|\
\\bprivate\\b|\ \\bprivate\\b|\
\\bprotected\\b|\ \\bprotected\\b|\
\\bptx_device\\b|\ \\bptx_device\\b|\
@ -234,16 +252,20 @@ patterns:
\\brelease\\b|\ \\brelease\\b|\
\\breturned\\b|\ \\breturned\\b|\
\\breturns_twice\\b|\ \\breturns_twice\\b|\
\\bsafestack\\b|\
\\bsanitize_address\\b|\ \\bsanitize_address\\b|\
\\bsanitize_hwaddress\\b|\
\\bsanitize_memory\\b|\ \\bsanitize_memory\\b|\
\\bsanitize_memtag\\b|\
\\bsanitize_thread\\b|\ \\bsanitize_thread\\b|\
\\bsection\\b|\ \\bsection\\b|\
\\bseq_cst\\b|\ \\bseq_cst\\b|\
\\bshadowcallstack\\b|\
\\bsideeffect\\b|\ \\bsideeffect\\b|\
\\bsignext\\b|\ \\bsignext\\b|\
\\bsyncscope\\b|\
\\bsource_filename\\b|\ \\bsource_filename\\b|\
\\bspeculatable\\b|\ \\bspeculatable\\b|\
\\bspeculative_load_hardening\\b|\
\\bspir_func\\b|\ \\bspir_func\\b|\
\\bspir_kernel\\b|\ \\bspir_kernel\\b|\
\\bsret\\b|\ \\bsret\\b|\
@ -252,8 +274,11 @@ patterns:
\\bsspstrong\\b|\ \\bsspstrong\\b|\
\\bstrictfp\\b|\ \\bstrictfp\\b|\
\\bswiftcc\\b|\ \\bswiftcc\\b|\
\\bswifterror\\b|\
\\bswiftself\\b|\ \\bswiftself\\b|\
\\bsyncscope\\b|\
\\btail\\b|\ \\btail\\b|\
\\btailcc\\b|\
\\btarget\\b|\ \\btarget\\b|\
\\bthread_local\\b|\ \\bthread_local\\b|\
\\bto\\b|\ \\bto\\b|\
@ -266,10 +291,11 @@ patterns:
\\bvolatile\\b|\ \\bvolatile\\b|\
\\bweak\\b|\ \\bweak\\b|\
\\bweak_odr\\b|\ \\bweak_odr\\b|\
\\bwillreturn\\b|\
\\bwin64cc\\b|\
\\bwithin\\b|\ \\bwithin\\b|\
\\bwriteonly\\b|\ \\bwriteonly\\b|\
\\bx86_64_sysvcc\\b|\ \\bx86_64_sysvcc\\b|\
\\bwin64cc\\b|\
\\bx86_fastcallcc\\b|\ \\bx86_fastcallcc\\b|\
\\bx86_stdcallcc\\b|\ \\bx86_stdcallcc\\b|\
\\bx86_thiscallcc\\b|\ \\bx86_thiscallcc\\b|\