MaskRay added a comment.

edeaf16f2c2f02d6e43312d48d26d354d87913f3 (2011) added the CMake variable 
`CLANG_RESOURCE_DIR` but did not explain why. 
The patch introduced conditions in C++ code like

  std::string path_to_clang_dir = std::string(CLANG_RESOURCE_DIR).empty()
                                      ? "/foo/bar/" LLDB_INSTALL_LIBDIR_BASENAME
                                        "/clang/" CLANG_VERSION_MAJOR_STRING
                                      : "/foo/bar/bin/" CLANG_RESOURCE_DIR;

which makes me uncomfortable.

I wish that we can just replace all places that construct 
`CLANG_INSTALL_LIBDIR_BASENAME "/clang/" CLANG_VERSION_MAJOR_STRING` manually 
with a simple `CLANG_RESOURCE_DIR` which is guaranteed to be non-empty.

In the long term, the CMake variable `CLANG_RESOURCE_DIR` probably should be 
removed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141907/new/

https://reviews.llvm.org/D141907

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to