[llvm-branch-commits] [clang-tools-extra] 3be5dbb - Make clangd CompletionModel usable even with non-standard (but supported) layout

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jun 14 11:23:08 PDT 2021


Author: serge-sans-paille
Date: 2021-06-14T14:22:25-04:00
New Revision: 3be5dbbc32dd348dddcec9e3baec96b7dcef8a35

URL: https://github.com/llvm/llvm-project/commit/3be5dbbc32dd348dddcec9e3baec96b7dcef8a35
DIFF: https://github.com/llvm/llvm-project/commit/3be5dbbc32dd348dddcec9e3baec96b7dcef8a35.diff

LOG: Make clangd CompletionModel usable even with non-standard (but supported) layout

llvm supports specifying a non-standard layout where each project lies in its
own place. Do not assume a fixed layout and use the appropriate cmake variable
instead.

Differential Revision: https://reviews.llvm.org/D96787

(cherry picked from commit f51ab1871655a9a96134c2636c37dcb5a6b01ac3)

Added: 
    

Modified: 
    clang-tools-extra/clangd/quality/CompletionModel.cmake

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/quality/CompletionModel.cmake b/clang-tools-extra/clangd/quality/CompletionModel.cmake
index 60c6d2aa84330..41bc2ed1890b0 100644
--- a/clang-tools-extra/clangd/quality/CompletionModel.cmake
+++ b/clang-tools-extra/clangd/quality/CompletionModel.cmake
@@ -5,8 +5,8 @@
 # will define a C++ class called ${cpp_class} - which may be a
 # namespace-qualified class name.
 function(gen_decision_forest model filename cpp_class)
-  set(model_compiler ${CMAKE_SOURCE_DIR}/../clang-tools-extra/clangd/quality/CompletionModelCodegen.py)
-  
+  set(model_compiler ${LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR}/clangd/quality/CompletionModelCodegen.py)
+
   set(output_dir ${CMAKE_CURRENT_BINARY_DIR})
   set(header_file ${output_dir}/${filename}.h)
   set(cpp_file ${output_dir}/${filename}.cpp)


        


More information about the llvm-branch-commits mailing list