diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2021-02-09 15:46:10 +0100 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2021-02-09 15:46:10 +0100 |
commit | 396d6a3220ee131f58ce46ca47f6f98cf7a3fcae (patch) | |
tree | 78ea5534f7d567e6bb96e4e102e30648d96931eb /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 7369bfb8abb6f62eebd045b8b243972863bf3190 (diff) | |
download | llvm-396d6a3220ee131f58ce46ca47f6f98cf7a3fcae.zip llvm-396d6a3220ee131f58ce46ca47f6f98cf7a3fcae.tar.gz llvm-396d6a3220ee131f58ce46ca47f6f98cf7a3fcae.tar.bz2 |
[clang][cli] Store unsigned instead of OptSpecifier in table
This fixes some buildbot failures with ambiguous call to OptSpecifier constructor.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<frontend::ActionKind, OptSpecifier> Table[] = { + static const std::pair<frontend::ActionKind, unsigned> 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<frontend::ActionKind> getFrontendAction(OptSpecifier &Opt) { for (const auto &ActionOpt : getFrontendActionTable()) - if (ActionOpt.second == Opt) + if (ActionOpt.second == Opt.getID()) return ActionOpt.first; return None; |