From: Chad Rosier Date: Mon, 9 Jul 2012 17:31:28 +0000 (+0000) Subject: 80-column and whitespace. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6467c9bf4f07f54789d3ed902f04048f4d80ad47;p=clang 80-column and whitespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159942 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 9b5783d8ef..a2afb76fe5 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -115,9 +115,10 @@ InputArgList *Driver::ParseArgStrings(ArrayRef ArgList) { } // Warn about -mcpu= without an argument. - if (A->getOption().matches(options::OPT_mcpu_EQ) && + if (A->getOption().matches(options::OPT_mcpu_EQ) && A->containsValue("")) { - Diag(clang::diag::warn_drv_empty_joined_argument) << A->getAsString(*Args); + Diag(clang::diag::warn_drv_empty_joined_argument) << + A->getAsString(*Args); } } @@ -253,7 +254,7 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { if (char *env = ::getenv("COMPILER_PATH")) { StringRef CompilerPath = env; while (!CompilerPath.empty()) { - std::pair Split = CompilerPath.split(':'); + std::pair Split = CompilerPath.split(':'); PrefixDirs.push_back(Split.first); CompilerPath = Split.second; } @@ -376,7 +377,7 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { void Driver::generateCompilationDiagnostics(Compilation &C, const Command *FailingCommand) { if (C.getArgs().hasArg(options::OPT_fno_crash_diagnostics)) - return; + return; // Don't try to generate diagnostics for link jobs. if (FailingCommand && FailingCommand->getCreator().isLinkJob()) @@ -400,7 +401,7 @@ void Driver::generateCompilationDiagnostics(Compilation &C, if (FailingCommand) C.PrintJob(OS, *FailingCommand, "\n", false); else - // Crash triggered by FORCE_CLANG_DIAGNOSTICS_CRASH, which doesn't have an + // Crash triggered by FORCE_CLANG_DIAGNOSTICS_CRASH, which doesn't have an // associated FailingCommand, so just pass all jobs. C.PrintJob(OS, C.getJobs(), "\n", false); OS.flush(); @@ -924,7 +925,7 @@ void Driver::BuildUniversalActions(const ToolChain &TC, if (A && !A->getOption().matches(options::OPT_g0) && !A->getOption().matches(options::OPT_gstabs) && ContainsCompileOrAssembleAction(Actions.back())) { - + // Add a 'dsymutil' step if necessary, when debug info is enabled and we // have a compile input. We need to run 'dsymutil' ourselves in such cases // because the debug info will refer to a temporary object file which is @@ -1510,7 +1511,7 @@ const char *Driver::GetNamedOutputPath(Compilation &C, NamedOutput = C.getArgs().MakeArgString(Suffixed.c_str()); } - // If we're saving temps and the temp file conflicts with the input file, + // If we're saving temps and the temp file conflicts with the input file, // then avoid overwriting input file. if (!AtTopLevel && C.getArgs().hasArg(options::OPT_save_temps) && NamedOutput == BaseName) { @@ -1630,7 +1631,7 @@ std::string Driver::GetProgramPath(const char *Name, const ToolChain &TC, return Name; } -std::string Driver::GetTemporaryPath(StringRef Prefix, const char *Suffix) +std::string Driver::GetTemporaryPath(StringRef Prefix, const char *Suffix) const { // FIXME: This is lame; sys::Path should provide this function (in particular, // it should know how to find the temporary files dir).