mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
Expose ProvidePositionalOption as a public API
The motivation is to reuse the key value parsing logic here to parse instance specific pass options within the context of MLIR. The primary functionality exposed is the "," splitting for arrays and the logic for properly handling duplicate definitions of a single flag. Patch by: Parker Schuh <parkers@google.com> Differential Revision: https://reviews.llvm.org/D68294 llvm-svn: 373815
This commit is contained in:
parent
8956cc9040
commit
44c156637e
@ -2000,6 +2000,9 @@ void ResetAllOptionOccurrences();
|
||||
/// where no options are supported.
|
||||
void ResetCommandLineParser();
|
||||
|
||||
/// Parses `Arg` into the option handler `Handler`.
|
||||
bool ProvidePositionalOption(Option *Handler, StringRef Arg, int i);
|
||||
|
||||
} // end namespace cl
|
||||
|
||||
} // end namespace llvm
|
||||
|
@ -692,7 +692,7 @@ static inline bool ProvideOption(Option *Handler, StringRef ArgName,
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool ProvidePositionalOption(Option *Handler, StringRef Arg, int i) {
|
||||
bool llvm::cl::ProvidePositionalOption(Option *Handler, StringRef Arg, int i) {
|
||||
int Dummy = i;
|
||||
return ProvideOption(Handler, Handler->ArgStr, Arg, 0, nullptr, Dummy);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user