================
@@ -391,9 +392,21 @@ struct SimplifyCFGPass : public 
OptionalPassInfoMixin<SimplifyCFGPass> {
 };
 } // namespace
 
+static Error parseArguments(ArrayRef<const char *> Args) {
+  SmallVector<const char *, 0> Argv = {"SimplifyCFG"};
+  append_range(Argv, Args);
+  std::string Msg;
+  raw_string_ostream OS(Msg);
+  if (!cl::ParseCommandLineOptions(Argv.size(), Argv.data(), "", &OS))
+    return createStringError(StringRef(Msg).trim());
+  return Error::success();
----------------
aengelke wrote:

Instead of this logic, just check that Args has at most one option, which must 
be "v1", "v2" or "v3"? We can easily drop cl::opt here.

https://github.com/llvm/llvm-project/pull/226773
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to