[Lldb-commits] [PATCH] D47235: Move ModuleList's dependency on clangDriver into Host
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Wed May 23 13:41:16 PDT 2018
> On May 23, 2018, at 1:33 PM, Zachary Turner <zturner at google.com> wrote:
> Actually, now I’m starting to wonder.... why can’t ClangModulesDeclVendor.cpp just call this function in clangDriver to get the default if the accessor returns an empty string? That sidesteps all of this initialization funny business and lets the client just handle it.
Since it is surfaced as a property, users expect that "settings list" returns a proper value. ClangModulesDeclVendor is only initialized once a Target exists. Xcode may also use this property to set the module cache path and initializing the property later than at LLDB initialization time could create a race condition.
ClangModulesDeclVendor also isn't the only user of the property. The Swift Plugin also needs to know it and I'd like to avoid duplicating the code.
More information about the lldb-commits