diff options
author | Yuka Takahashi <yukatkh@gmail.com> | 2017-07-05 02:36:32 +0000 |
---|---|---|
committer | Yuka Takahashi <yukatkh@gmail.com> | 2017-07-05 02:36:32 +0000 |
commit | 34a7c3baf9d7d4312ac5c16662821ca48a60d9c3 (patch) | |
tree | be3d91626e8d622dc2187056cbf6b4ae7a690bbb /llvm/lib/Option | |
parent | e03a65458135813f680420760c4a14a99c24995f (diff) | |
download | bcm5719-llvm-34a7c3baf9d7d4312ac5c16662821ca48a60d9c3.tar.gz bcm5719-llvm-34a7c3baf9d7d4312ac5c16662821ca48a60d9c3.zip |
[Bash-autocompletion] Show flags which has HelpText or GroupID
Summary: Otherwise internal flags will be also completed.
Differential Revision: https://reviews.llvm.org/D34930
llvm-svn: 307116
Diffstat (limited to 'llvm/lib/Option')
-rw-r--r-- | llvm/lib/Option/OptTable.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Option/OptTable.cpp b/llvm/lib/Option/OptTable.cpp index acb9e8d015b..a5c12ac4a90 100644 --- a/llvm/lib/Option/OptTable.cpp +++ b/llvm/lib/Option/OptTable.cpp @@ -228,7 +228,7 @@ OptTable::suggestValueCompletions(StringRef Option, StringRef Arg) const { std::vector<std::string> OptTable::findByPrefix(StringRef Cur) const { std::vector<std::string> Ret; for (const Info &In : OptionInfos.slice(FirstSearchableIndex)) { - if (!In.Prefixes) + if (!In.Prefixes || (!In.HelpText && !In.GroupID)) continue; for (int I = 0; In.Prefixes[I]; I++) { std::string S = std::string(In.Prefixes[I]) + std::string(In.Name); |