From 2966ad74e372295fc552ca7ddd0d8e127bd78c11 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Thu, 6 Jun 2024 11:26:21 -0500 Subject: [PATCH] Pass name and compiler through --- lisp/llvm-lib/llvm-act-on-file/act-on-c-file.el | 5 ++++- lisp/llvm-lib/llvm-shared.el | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/llvm-lib/llvm-act-on-file/act-on-c-file.el b/lisp/llvm-lib/llvm-act-on-file/act-on-c-file.el index e156e66..34bb55e 100644 --- a/lisp/llvm-lib/llvm-act-on-file/act-on-c-file.el +++ b/lisp/llvm-lib/llvm-act-on-file/act-on-c-file.el @@ -72,7 +72,10 @@ (let ((compiler-action (aml/get-map-prop ll/c-file-action-map action :compiler-action)) (compiler (lls/prompt-tool "clang$"))) (string-join - (list (lls/get-clang-command-fun compiler file compiler-action) + (list (lls/get-clang-command-fun + :compiler compiler + :file file + :action compiler-action) (pcase action ('debug (format "-mllvm -debug-only=%s" (ll/read-pass-name "Which pass? "))) ('before-after (let ((pass (ll/read-pass-name "Which pass? "))) diff --git a/lisp/llvm-lib/llvm-shared.el b/lisp/llvm-lib/llvm-shared.el index 7101710..a05996e 100644 --- a/lisp/llvm-lib/llvm-shared.el +++ b/lisp/llvm-lib/llvm-shared.el @@ -189,9 +189,9 @@ (cons dir (lls/conf-get 'build-dirs)))) -(defun lls/get-clang-options (&optional file compiler) - (funcall (lls/conf-get 'target-clang-opts-fun) - :compiler compiler :filename file)) +(defun lls/get-clang-options (&rest args) + (apply (lls/conf-get 'target-clang-opts-fun) + args)) ;; =============================== Misc ==============================