summaryrefslogtreecommitdiff
path: root/include/llvm/Option/OptTable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Option/OptTable.h')
-rw-r--r--include/llvm/Option/OptTable.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Option/OptTable.h b/include/llvm/Option/OptTable.h
index e0169b927319..3e7b019a0d4e 100644
--- a/include/llvm/Option/OptTable.h
+++ b/include/llvm/Option/OptTable.h
@@ -53,6 +53,7 @@ public:
unsigned short GroupID;
unsigned short AliasID;
const char *AliasArgs;
+ const char *Values;
};
private:
@@ -120,6 +121,19 @@ public:
return getInfo(id).MetaVar;
}
+ /// Find possible value for given flags. This is used for shell
+ /// autocompletion.
+ ///
+ /// \param [in] Option - Key flag like "-stdlib=" when "-stdlib=l"
+ /// was passed to clang.
+ ///
+ /// \param [in] Arg - Value which we want to autocomplete like "l"
+ /// when "-stdlib=l" was passed to clang.
+ ///
+ /// \return The vector of possible values.
+ std::vector<std::string> suggestValueCompletions(StringRef Option,
+ StringRef Arg) const;
+
/// Find flags from OptTable which starts with Cur.
///
/// \param [in] Cur - String prefix that all returned flags need