80-column and whitespace.

llvm-svn: 159942
This commit is contained in:
Chad Rosier 2012-07-09 17:31:28 +00:00
parent 12e730c6e3
commit 6213549751
1 changed files with 9 additions and 8 deletions

View File

@ -115,9 +115,10 @@ InputArgList *Driver::ParseArgStrings(ArrayRef<const char *> 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<const char *> ArgList) {
if (char *env = ::getenv("COMPILER_PATH")) {
StringRef CompilerPath = env;
while (!CompilerPath.empty()) {
std::pair<StringRef, StringRef> Split = CompilerPath.split(':');
std::pair<StringRef, StringRef> Split = CompilerPath.split(':');
PrefixDirs.push_back(Split.first);
CompilerPath = Split.second;
}
@ -376,7 +377,7 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> 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).