[llvm] 7c2d833 - [gn build] add file i forgot to add in 929d91a55616
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 13:01:09 PDT 2020
Author: Nico Weber
Date: 2020-09-18T16:01:00-04:00
New Revision: 7c2d83347f4ea146af1aca72fe289294aaf212be
URL: https://github.com/llvm/llvm-project/commit/7c2d83347f4ea146af1aca72fe289294aaf212be
DIFF: https://github.com/llvm/llvm-project/commit/7c2d83347f4ea146af1aca72fe289294aaf212be.diff
LOG: [gn build] add file i forgot to add in 929d91a55616
Added:
llvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni
Modified:
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni b/llvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni
new file mode 100644
index 000000000000..09c7d3e96fff
--- /dev/null
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni
@@ -0,0 +1,37 @@
+template("gen_decision_forest") {
+ model = invoker.model
+ filename = invoker.filename
+ cpp_class = invoker.cpp_class
+
+ action("${target_name}Cpp") {
+ script = "//clang-tools-extra/clangd/quality/CompletionModelCodegen.py"
+ outputs = [
+ "$target_gen_dir/$filename.cpp",
+ "$target_gen_dir/$filename.h",
+ ]
+ args = [
+ "--model",
+ rebase_path(model, root_build_dir),
+ "--output_dir",
+ rebase_path(target_gen_dir, root_build_dir),
+ "--filename",
+ filename,
+ "--cpp_class",
+ cpp_class,
+ ]
+ }
+
+ config("${target_name}Config") {
+ cflags = [ "-Wno-unused-label" ]
+ }
+
+ source_set(target_name) {
+ configs += [
+ "//llvm/utils/gn/build:clang_code",
+ ":${target_name}Config",
+ ]
+ deps = [ ":${target_name}Cpp" ]
+ include_dirs = [ "." ]
+ sources = get_target_outputs(":${target_name}Cpp")
+ }
+}
More information about the llvm-commits
mailing list