From 42a2919e733349f54f5fac5bf0cbbe7f355f1ed9 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Wed, 9 Jul 2014 14:09:52 +0000 Subject: [PATCH] Remove dead code from r212620 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212622 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/driver/cc1as_main.cpp | 38 +++---------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp index 0a2fc45c2a..e41bc9f824 100644 --- a/tools/driver/cc1as_main.cpp +++ b/tools/driver/cc1as_main.cpp @@ -147,37 +147,6 @@ public: } -#if 0 -bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, - const char *const *ArgBegin, - const char *const *ArgEnd, - DiagnosticsEngine &Diags) { - bool Success = true; - - // Parse the arguments. - std::unique_ptr Opts(createDriverOptTable()); - const unsigned IncludedFlagsBitmask = options::CC1Option; - unsigned MissingArgIndex, MissingArgCount; - std::unique_ptr Args( - Opts->ParseArgs(ArgBegin, ArgEnd, MissingArgIndex, MissingArgCount, - IncludedFlagsBitmask)); - - // Check for missing argument error. - if (MissingArgCount) { - Diags.Report(diag::err_drv_missing_argument) - << Args->getArgString(MissingArgIndex) << MissingArgCount; - Success = false; - } - - // Issue errors on unknown arguments. - for (arg_iterator it = Args->filtered_begin(OPT_UNKNOWN), - ie = Args->filtered_end(); it != ie; ++it) { - Diags.Report(diag::err_drv_unknown_argument) << (*it)->getAsString(*Args); - Success = false; - } -} -#endif - bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts, const char **ArgBegin, const char **ArgEnd, @@ -191,7 +160,7 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts, unsigned MissingArgIndex, MissingArgCount; std::unique_ptr Args( OptTbl->ParseArgs(ArgBegin, ArgEnd, MissingArgIndex, MissingArgCount, - IncludedFlagsBitmask)); + IncludedFlagsBitmask)); // Check for missing argument error. if (MissingArgCount) { @@ -483,9 +452,8 @@ int cc1as_main(const char **ArgBegin, const char **ArgEnd, if (Asm.ShowHelp) { std::unique_ptr Opts(driver::createDriverOptTable()); - Opts->PrintHelp(llvm::outs(), "clang -cc1as", - "Clang Integrated Assembler", - /*Include=*/ driver::options::CC1AsOption, /*Exclude=*/ 0); + Opts->PrintHelp(llvm::outs(), "clang -cc1as", "Clang Integrated Assembler", + /*Include=*/driver::options::CC1AsOption, /*Exclude=*/0); return 0; } -- 2.40.0