This patch introduces support for default values of list of CL options.
It fixes the issue in https://github.com/llvm/llvm-project/issues/52667
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/Support/CommandLine.h | ||
---|---|---|
440 | The naming here is a bit unfortunate since it sort of clashes with the common C++ vocabulary that is std::initializer_list but I don't have a lot of better ideas :( | |
441 | All these const llvm::ArrayRef<Ty>& ought to be able to just be llvm::ArrayRef<Ty> (both in the struct here and the function parameters below). ArrayRef essentially already acts as a view/reference to some storage and is cheap and trivially copyable. I believe you can also drop the llvm:: namespace qualifier |
Change initialization functions' names and correctly use ArrayRef
llvm/include/llvm/Support/CommandLine.h | ||
---|---|---|
440 | Maybe I'll go with list_initializer and list_init to avoid name collision |
The naming here is a bit unfortunate since it sort of clashes with the common C++ vocabulary that is std::initializer_list but I don't have a lot of better ideas :(