mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-06-14 12:21:20 +00:00
Add check for initialized
This commit is contained in:
parent
78b2de42bf
commit
3197b406af
1 changed files with 5 additions and 2 deletions
|
|
@ -140,9 +140,12 @@
|
|||
(load-llvm-mode (lls/conf-get 'root-dir))
|
||||
(message "llvm-lib initialize!"))
|
||||
|
||||
(defun lls/initialized? ()
|
||||
(and (lls/get-llvm-config)
|
||||
(llvm-config-p (lls/get-llvm-config))))
|
||||
|
||||
(defun lls/ensure-initialized ()
|
||||
(when (or (not (lls/get-llvm-config))
|
||||
(not (llvm-config-p (lls/get-llvm-config))))
|
||||
(when (not (lls/initialized?))
|
||||
(if (not (functionp lls/target-init-fun))
|
||||
(error "Please register an init function for llvm")
|
||||
(lls/initialize))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue