[all-commits] [llvm/llvm-project] 208e3f: [lldb] Fix that symbols.clang-modules-cache-path i...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Thu Dec 10 04:38:27 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 208e3f5d9b6c172f65dbb9cdbc9354c81c6d8911
      https://github.com/llvm/llvm-project/commit/208e3f5d9b6c172f65dbb9cdbc9354c81c6d8911
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2020-12-10 (Thu, 10 Dec 2020)

  Changed paths:
    M lldb/include/lldb/Core/ModuleList.h
    M lldb/source/Core/ModuleList.cpp
    A lldb/test/Shell/Settings/TestDefaultModuleCachePath.test
    M lldb/test/Shell/helper/toolchain.py

  Log Message:
  -----------
  [lldb] Fix that symbols.clang-modules-cache-path is never initialized

LLDB is supposed to ask the Clang Driver what the default module cache path is
and then use that value as the default for the
`symbols.clang-modules-cache-path` setting. However, we use the property type
`String` to change `symbols.clang-modules-cache-path` even though the type of
that setting is `FileSpec`, so the setter will simply do nothing and return
`false`. We also don't check the return value of the setter, so this whole code
ends up not doing anything at all.

This changes the setter to use the correct property type and adds an assert that
we actually successfully set the default path. Also adds a test that checks that
the default value for this setting is never unset/empty path as this would
effectively disable the import-std-module feature from working by default.

Reviewed By: JDevlieghere, shafik

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




More information about the All-commits mailing list