summaryrefslogtreecommitdiff
path: root/elpa/irony-20220110.849/irony-cdb-libclang.el
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-06-07 08:23:47 -0400
committermattkae <mattkae@protonmail.com>2022-06-07 08:23:47 -0400
commitbd18a38c2898548a3664a9ddab9f79c84f2caf4a (patch)
tree95b9933376770381bd8859782ae763be81c2d72b /elpa/irony-20220110.849/irony-cdb-libclang.el
parentb07628dddf418d4f47b858e6c35fd3520fbaeed2 (diff)
parentef160dea332af4b4fe5e2717b962936c67e5fe9e (diff)
Merge conflict
Diffstat (limited to 'elpa/irony-20220110.849/irony-cdb-libclang.el')
-rw-r--r--elpa/irony-20220110.849/irony-cdb-libclang.el73
1 files changed, 0 insertions, 73 deletions
diff --git a/elpa/irony-20220110.849/irony-cdb-libclang.el b/elpa/irony-20220110.849/irony-cdb-libclang.el
deleted file mode 100644
index 79d5849..0000000
--- a/elpa/irony-20220110.849/irony-cdb-libclang.el
+++ /dev/null
@@ -1,73 +0,0 @@
-;;; irony-cdb-libclang.el --- Compilation Database for irony using libclang
-
-;; Copyright (C) 2015 Karl Hylén
-
-;; Author: Karl Hylén <karl.hylen@gmail.com>
-;; Keywords: c, convenience, tools
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-;;
-;; Compilation Database support for Irony using libclangs CXCompilationDatabase,
-;; http://clang.llvm.org/doxygen/group__COMPILATIONDB.html
-
-;;; Code:
-
-(require 'irony-cdb)
-(require 'irony-cdb-json)
-
-(require 'cl-lib)
-
-;;;###autoload
-(defun irony-cdb-libclang (command &rest args)
- (cl-case command
- (get-compile-options (irony-cdb-libclang--get-compile-options))))
-
-(defun irony-cdb-libclang--get-compile-options ()
- (irony--awhen (irony-cdb-json--locate-db)
- (irony-cdb-libclang--server-exact-flags it)))
-
-(defun irony-cdb-libclang--server-exact-flags (db-file)
- "Get compilation options from irony-server.
-
-The parameter DB-FILE is the database file."
- (when buffer-file-name
- (let* ((build-dir (file-name-directory db-file))
- (file buffer-file-name)
- (task (irony--get-compile-options-task build-dir file))
- (compile-options (irony--run-task task)))
- (irony-cdb-libclang--adjust-options-and-remove-compiler
- file compile-options))))
-
-(defun irony-cdb-libclang--adjust-options-and-remove-compiler (file cmds)
- "Remove compiler, target file FILE and output file from CMDS.
-
-The parameter CMDS is a list of conses. In each cons, the car holds the options
-and the cdr holds the working directory where the compile command was issued."
- (mapcar (lambda (cmd)
- (let ((opt (irony-cdb--remove-compiler-from-flags (car cmd)))
- (wdir (cdr cmd)))
- (cons
- (irony-cdb-json--adjust-compile-options opt file wdir)
- wdir)))
- cmds))
-
-(provide 'irony-cdb-libclang)
-
-;; Local Variables:
-;; byte-compile-warnings: (not cl-functions)
-;; End:
-
-;;; irony-cdb-libclang ends here