From: Jan Svoboda Date: Tue, 9 Feb 2021 14:46:10 +0000 (+0100) Subject: [clang][cli] Store unsigned instead of OptSpecifier in table X-Git-Tag: llvmorg-14-init~15646 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=396d6a3220ee131f58ce46ca47f6f98cf7a3fcae;p=platform%2Fupstream%2Fllvm.git [clang][cli] Store unsigned instead of OptSpecifier in table This fixes some buildbot failures with ambiguous call to OptSpecifier constructor. --- diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index d9df4da..9cdaab88 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2158,7 +2158,7 @@ static bool parseTestModuleFileExtensionArg(StringRef Arg, /// intentionally missing, as this case is handled separately from other /// frontend options. static const auto &getFrontendActionTable() { - static const std::pair Table[] = { + static const std::pair Table[] = { {frontend::ASTDeclList, OPT_ast_list}, {frontend::ASTDump, OPT_ast_dump_all_EQ}, @@ -2213,7 +2213,7 @@ static const auto &getFrontendActionTable() { /// Maps command line option to frontend action. static Optional getFrontendAction(OptSpecifier &Opt) { for (const auto &ActionOpt : getFrontendActionTable()) - if (ActionOpt.second == Opt) + if (ActionOpt.second == Opt.getID()) return ActionOpt.first; return None;