<div dir="ltr">From what I understand, the people send out such a CL if they plan to make a reasonable amount of changes and use clang-format going forward. Now, the alternative would be to just reformat the lines affected by a patch (e.g. use git-clang-format). The latter has two disadvantages:<div>1. The actual patch is harder to understand as there are more formatting changes mixed into it.</div><div>2. If the state of the file is significantly different from what clang-format does, the lines affected by a patch might look quite inconsistent.</div><div><br></div><div>I not trying to argue either way, just saying that the value of this patch is not in making the file more readable, but to ease further changes to it.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 28, 2015 at 2:00 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">For what it is worth, I find clang-format an awesome tool for *fixing* conflicts: just clang-format both ends before you merge.</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Jun 27, 2015 12:34 PM, "Nico Weber" <<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Can we please not land CLs like this in the future? They screw up `svn blame` output, cause tons of local conflicts, and don't add all that much.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 26, 2015 at 8:47 AM, Douglas Katzman <span dir="ltr"><<a href="mailto:dougk@google.com" target="_blank">dougk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dougk<br>
Date: Fri Jun 26 10:47:46 2015<br>
New Revision: 240791<br>
<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D240791-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=HQQNmbImUf4F-mcwxbN9TPWVeRmDPUPU4dZwwCB61Pk&s=ehuiDRVzsaoAEE_Xwi0aZYBuWJWAIKpF0BvdqTqpOj8&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=240791&view=rev</a><br>
Log:<br>
clang-format some of the files in lib/Driver. NFC<br>
<br>
Nothing was hand edited afterward except a few literal strings<br>
and comments that were poorly broken.<br>
<br>
Differential Revision: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10689&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=HQQNmbImUf4F-mcwxbN9TPWVeRmDPUPU4dZwwCB61Pk&s=KjQXFMmiibw0_SEtTwJ4CMCZ4f51wZJxUXrCis-mLJI&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10689</a><br>
<br>
Modified:<br>
cfe/trunk/lib/Driver/Driver.cpp<br>
cfe/trunk/lib/Driver/ToolChains.cpp<br>
cfe/trunk/lib/Driver/ToolChains.h<br>
cfe/trunk/lib/Driver/Tools.cpp<br>
<br>
Modified: cfe/trunk/lib/Driver/Driver.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_lib_Driver_Driver.cpp-3Frev-3D240791-26r1-3D240790-26r2-3D240791-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=HQQNmbImUf4F-mcwxbN9TPWVeRmDPUPU4dZwwCB61Pk&s=iFEgxCqDJj7sKJnBBLfAOJtr4_JAVx3j2I3JOxCPna8&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=240791&r1=240790&r2=240791&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/Driver.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Driver.cpp Fri Jun 26 10:47:46 2015<br>
@@ -58,7 +58,7 @@ Driver::Driver(StringRef ClangExecutable<br>
CCCUsePCH(true), SuppressMissingInputWarning(false) {<br>
<br>
Name = llvm::sys::path::filename(ClangExecutable);<br>
- Dir = llvm::sys::path::parent_path(ClangExecutable);<br>
+ Dir = llvm::sys::path::parent_path(ClangExecutable);<br>
<br>
// Compute the path to the resource directory.<br>
StringRef ClangResourceDir(CLANG_RESOURCE_DIR);<br>
@@ -81,7 +81,7 @@ Driver::~Driver() {<br>
<br>
void Driver::ParseDriverMode(ArrayRef<const char *> Args) {<br>
const std::string OptName =<br>
- getOpts().getOption(options::OPT_driver_mode).getPrefixedName();<br>
+ getOpts().getOption(options::OPT_driver_mode).getPrefixedName();<br>
<br>
for (const char *ArgPtr : Args) {<br>
// Ingore nullptrs, they are response file's EOL markers<br>
@@ -93,11 +93,11 @@ void Driver::ParseDriverMode(ArrayRef<co<br>
<br>
const StringRef Value = Arg.drop_front(OptName.size());<br>
const unsigned M = llvm::StringSwitch<unsigned>(Value)<br>
- .Case("gcc", GCCMode)<br>
- .Case("g++", GXXMode)<br>
- .Case("cpp", CPPMode)<br>
- .Case("cl", CLMode)<br>
- .Default(~0U);<br>
+ .Case("gcc", GCCMode)<br>
+ .Case("g++", GXXMode)<br>
+ .Case("cpp", CPPMode)<br>
+ .Case("cl", CLMode)<br>
+ .Default(~0U);<br>
<br>
if (M != ~0U)<br>
Mode = static_cast<DriverMode>(M);<br>
@@ -112,7 +112,7 @@ InputArgList Driver::ParseArgStrings(Arr<br>
unsigned IncludedFlagsBitmask;<br>
unsigned ExcludedFlagsBitmask;<br>
std::tie(IncludedFlagsBitmask, ExcludedFlagsBitmask) =<br>
- getIncludeExcludeOptionFlagMasks();<br>
+ getIncludeExcludeOptionFlagMasks();<br>
<br>
unsigned MissingArgIndex, MissingArgCount;<br>
InputArgList Args =<br>
@@ -132,8 +132,7 @@ InputArgList Driver::ParseArgStrings(Arr<br>
}<br>
<br>
// Warn about -mcpu= without an argument.<br>
- if (A->getOption().matches(options::OPT_mcpu_EQ) &&<br>
- A->containsValue("")) {<br>
+ if (A->getOption().matches(options::OPT_mcpu_EQ) && A->containsValue("")) {<br>
Diag(clang::diag::warn_drv_empty_joined_argument) << A->getAsString(Args);<br>
}<br>
}<br>
@@ -147,14 +146,13 @@ InputArgList Driver::ParseArgStrings(Arr<br>
// Determine which compilation mode we are in. We look for options which<br>
// affect the phase, starting with the earliest phases, and record which<br>
// option we used to determine the final phase.<br>
-phases::ID Driver::getFinalPhase(const DerivedArgList &DAL, Arg **FinalPhaseArg)<br>
-const {<br>
+phases::ID Driver::getFinalPhase(const DerivedArgList &DAL,<br>
+ Arg **FinalPhaseArg) const {<br>
Arg *PhaseArg = nullptr;<br>
phases::ID FinalPhase;<br>
<br>
// -{E,EP,P,M,MM} only run the preprocessor.<br>
- if (CCCIsCPP() ||<br>
- (PhaseArg = DAL.getLastArg(options::OPT_E)) ||<br>
+ if (CCCIsCPP() || (PhaseArg = DAL.getLastArg(options::OPT_E)) ||<br>
(PhaseArg = DAL.getLastArg(options::OPT__SLASH_EP)) ||<br>
(PhaseArg = DAL.getLastArg(options::OPT_M, options::OPT_MM)) ||<br>
(PhaseArg = DAL.getLastArg(options::OPT__SLASH_P))) {<br>
@@ -190,7 +188,7 @@ const {<br>
return FinalPhase;<br>
}<br>
<br>
-static Arg* MakeInputArg(DerivedArgList &Args, OptTable *Opts,<br>
+static Arg *MakeInputArg(DerivedArgList &Args, OptTable *Opts,<br>
StringRef Value) {<br>
Arg *A = new Arg(Opts->getOption(options::OPT_INPUT), Value,<br>
Args.getBaseArgs().MakeIndex(Value), Value.data());<br>
@@ -248,15 +246,13 @@ DerivedArgList *Driver::TranslateInputAr<br>
<br>
// Rewrite unless -nostdlib is present.<br>
if (!HasNostdlib && Value == "stdc++") {<br>
- DAL->AddFlagArg(A, Opts->getOption(<br>
- options::OPT_Z_reserved_lib_stdcxx));<br>
+ DAL->AddFlagArg(A, Opts->getOption(options::OPT_Z_reserved_lib_stdcxx));<br>
continue;<br>
}<br>
<br>
// Rewrite unconditionally.<br>
if (Value == "cc_kext") {<br>
- DAL->AddFlagArg(A, Opts->getOption(<br>
- options::OPT_Z_reserved_lib_cckext));<br>
+ DAL->AddFlagArg(A, Opts->getOption(options::OPT_Z_reserved_lib_cckext));<br>
continue;<br>
}<br>
}<br>
@@ -272,8 +268,8 @@ DerivedArgList *Driver::TranslateInputAr<br>
DAL->append(A);<br>
}<br>
<br>
- // Add a default value of -mlinker-version=, if one was given and the user<br>
- // didn't specify one.<br>
+// Add a default value of -mlinker-version=, if one was given and the user<br>
+// didn't specify one.<br>
#if defined(HOST_LINK_VERSION)<br>
if (!Args.hasArg(options::OPT_mlinker_version_EQ) &&<br>
strlen(HOST_LINK_VERSION) > 0) {<br>
@@ -295,8 +291,8 @@ Compilation *Driver::BuildCompilation(Ar<br>
if (char *env = ::getenv("COMPILER_PATH")) {<br>
StringRef CompilerPath = env;<br>
while (!CompilerPath.empty()) {<br>
- std::pair<StringRef, StringRef> Split<br>
- = CompilerPath.split(llvm::sys::EnvPathSeparator);<br>
+ std::pair<StringRef, StringRef> Split =<br>
+ CompilerPath.split(llvm::sys::EnvPathSeparator);<br>
PrefixDirs.push_back(Split.first);<br>
CompilerPath = Split.second;<br>
}<br>
@@ -387,8 +383,8 @@ Compilation *Driver::BuildCompilation(Ar<br>
// Construct the list of abstract actions to perform for this compilation. On<br>
// MachO targets this uses the driver-driver and universal actions.<br>
if (TC.getTriple().isOSBinFormatMachO())<br>
- BuildUniversalActions(C->getDefaultToolChain(), C->getArgs(),<br>
- Inputs, C->getActions());<br>
+ BuildUniversalActions(C->getDefaultToolChain(), C->getArgs(), Inputs,<br>
+ C->getActions());<br>
else<br>
BuildActions(C->getDefaultToolChain(), C->getArgs(), Inputs,<br>
C->getActions());<br>
@@ -420,8 +416,8 @@ void Driver::generateCompilationDiagnost<br>
PrintVersion(C, llvm::errs());<br>
<br>
Diag(clang::diag::note_drv_command_failed_diag_msg)<br>
- << "PLEASE submit a bug report to " BUG_REPORT_URL " and include the "<br>
- "crash backtrace, preprocessed source, and associated run script.";<br>
+ << "PLEASE submit a bug report to " BUG_REPORT_URL " and include the "<br>
+ "crash backtrace, preprocessed source, and associated run script.";<br>
<br>
// Suppress driver output and emit preprocessor output to temp file.<br>
Mode = CPPMode;<br>
@@ -446,12 +442,12 @@ void Driver::generateCompilationDiagnost<br>
<br>
// Ignore input from stdin or any inputs that cannot be preprocessed.<br>
// Check type first as not all linker inputs have a value.<br>
- if (types::getPreprocessedType(it->first) == types::TY_INVALID) {<br>
+ if (types::getPreprocessedType(it->first) == types::TY_INVALID) {<br>
IgnoreInput = true;<br>
} else if (!strcmp(it->second->getValue(), "-")) {<br>
Diag(clang::diag::note_drv_command_failed_diag_msg)<br>
- << "Error generating preprocessed source(s) - ignoring input from stdin"<br>
- ".";<br>
+ << "Error generating preprocessed source(s) - "<br>
+ "ignoring input from stdin.";<br>
IgnoreInput = true;<br>
}<br>
<br>
@@ -465,7 +461,8 @@ void Driver::generateCompilationDiagnost<br>
<br>
if (Inputs.empty()) {<br>
Diag(clang::diag::note_drv_command_failed_diag_msg)<br>
- << "Error generating preprocessed source(s) - no preprocessable inputs.";<br>
+ << "Error generating preprocessed source(s) - "<br>
+ "no preprocessable inputs.";<br>
return;<br>
}<br>
<br>
@@ -480,8 +477,8 @@ void Driver::generateCompilationDiagnost<br>
}<br>
if (ArchNames.size() > 1) {<br>
Diag(clang::diag::note_drv_command_failed_diag_msg)<br>
- << "Error generating preprocessed source(s) - cannot generate "<br>
- "preprocessed source with multiple -arch options.";<br>
+ << "Error generating preprocessed source(s) - cannot generate "<br>
+ "preprocessed source with multiple -arch options.";<br>
return;<br>
}<br>
<br>
@@ -498,7 +495,7 @@ void Driver::generateCompilationDiagnost<br>
// If there were errors building the compilation, quit now.<br>
if (Trap.hasErrorOccurred()) {<br>
Diag(clang::diag::note_drv_command_failed_diag_msg)<br>
- << "Error generating preprocessed source(s).";<br>
+ << "Error generating preprocessed source(s).";<br>
return;<br>
}<br>
<br>
@@ -512,14 +509,14 @@ void Driver::generateCompilationDiagnost<br>
C.CleanupFileList(C.getTempFiles(), true);<br>
<br>
Diag(clang::diag::note_drv_command_failed_diag_msg)<br>
- << "Error generating preprocessed source(s).";<br>
+ << "Error generating preprocessed source(s).";<br>
return;<br>
}<br>
<br>
const ArgStringList &TempFiles = C.getTempFiles();<br>
if (TempFiles.empty()) {<br>
Diag(clang::diag::note_drv_command_failed_diag_msg)<br>
- << "Error generating preprocessed source(s).";<br>
+ << "Error generating preprocessed source(s).";<br>
return;<br>
}<br>
<br>
@@ -583,12 +580,13 @@ void Driver::setUpResponseFiles(Compilat<br>
return;<br>
<br>
std::string TmpName = GetTemporaryPath("response", "txt");<br>
- CurCommand->setResponseFile(C.addTempFile(C.getArgs().MakeArgString(<br>
- TmpName.c_str())));<br>
+ CurCommand->setResponseFile(<br>
+ C.addTempFile(C.getArgs().MakeArgString(TmpName.c_str())));<br>
}<br>
<br>
-int Driver::ExecuteCompilation(Compilation &C,<br>
- SmallVectorImpl< std::pair<int, const Command *> > &FailingCommands) {<br>
+int Driver::ExecuteCompilation(<br>
+ Compilation &C,<br>
+ SmallVectorImpl<std::pair<int, const Command *>> &FailingCommands) {<br>
// Just print if -### was present.<br>
if (C.getArgs().hasArg(options::OPT__HASH_HASH_HASH)) {<br>
C.getJobs().Print(llvm::errs(), "\n", true);<br>
@@ -640,10 +638,10 @@ int Driver::ExecuteCompilation(Compilati<br>
// FIXME: See FIXME above regarding result code interpretation.<br>
if (Res < 0)<br>
Diag(clang::diag::err_drv_command_signalled)<br>
- << FailingTool.getShortName();<br>
+ << FailingTool.getShortName();<br>
else<br>
- Diag(clang::diag::err_drv_command_failed)<br>
- << FailingTool.getShortName() << Res;<br>
+ Diag(clang::diag::err_drv_command_failed) << FailingTool.getShortName()<br>
+ << Res;<br>
}<br>
}<br>
return 0;<br>
@@ -653,7 +651,7 @@ void Driver::PrintHelp(bool ShowHidden)<br>
unsigned IncludedFlagsBitmask;<br>
unsigned ExcludedFlagsBitmask;<br>
std::tie(IncludedFlagsBitmask, ExcludedFlagsBitmask) =<br>
- getIncludeExcludeOptionFlagMasks();<br>
+ getIncludeExcludeOptionFlagMasks();<br>
<br>
ExcludedFlagsBitmask |= options::NoDriverOption;<br>
if (!ShowHidden)<br>
@@ -684,8 +682,8 @@ void Driver::PrintVersion(const Compilat<br>
/// option.<br>
static void PrintDiagnosticCategories(raw_ostream &OS) {<br>
// Skip the empty category.<br>
- for (unsigned i = 1, max = DiagnosticIDs::getNumberOfCategories();<br>
- i != max; ++i)<br>
+ for (unsigned i = 1, max = DiagnosticIDs::getNumberOfCategories(); i != max;<br>
+ ++i)<br>
OS << i << ',' << DiagnosticIDs::getCategoryNameFromID(i) << '\n';<br>
}<br>
<br>
@@ -741,7 +739,8 @@ bool Driver::HandleImmediateArgs(const C<br>
llvm::outs() << "programs: =";<br>
bool separator = false;<br>
for (const std::string &Path : TC.getProgramPaths()) {<br>
- if (separator) llvm::outs() << ':';<br>
+ if (separator)<br>
+ llvm::outs() << ':';<br>
llvm::outs() << Path;<br>
separator = true;<br>
}<br>
@@ -817,7 +816,7 @@ bool Driver::HandleImmediateArgs(const C<br>
// and latest-occuring action. Traversal is in pre-order, visiting the<br>
// inputs to each action before printing the action itself.<br>
static unsigned PrintActions1(const Compilation &C, Action *A,<br>
- std::map<Action*, unsigned> &Ids) {<br>
+ std::map<Action *, unsigned> &Ids) {<br>
if (Ids.count(A)) // A was already visited.<br>
return Ids[A];<br>
<br>
@@ -858,8 +857,7 @@ void Driver::PrintActions(const Compilat<br>
/// \brief Check whether the given input tree contains any compilation or<br>
/// assembly actions.<br>
static bool ContainsCompileOrAssembleAction(const Action *A) {<br>
- if (isa<CompileJobAction>(A) ||<br>
- isa<BackendJobAction>(A) ||<br>
+ if (isa<CompileJobAction>(A) || isa<BackendJobAction>(A) ||<br>
isa<AssembleJobAction>(A))<br>
return true;<br>
<br>
@@ -870,8 +868,7 @@ static bool ContainsCompileOrAssembleAct<br>
return false;<br>
}<br>
<br>
-void Driver::BuildUniversalActions(const ToolChain &TC,<br>
- DerivedArgList &Args,<br>
+void Driver::BuildUniversalActions(const ToolChain &TC, DerivedArgList &Args,<br>
const InputList &BAInputs,<br>
ActionList &Actions) const {<br>
llvm::PrettyStackTraceString CrashInfo("Building universal build actions");<br>
@@ -884,10 +881,9 @@ void Driver::BuildUniversalActions(const<br>
// Validate the option here; we don't save the type here because its<br>
// particular spelling may participate in other driver choices.<br>
llvm::Triple::ArchType Arch =<br>
- tools::darwin::getArchTypeForMachOArchName(A->getValue());<br>
+ tools::darwin::getArchTypeForMachOArchName(A->getValue());<br>
if (Arch == llvm::Triple::UnknownArch) {<br>
- Diag(clang::diag::err_drv_invalid_arch_name)<br>
- << A->getAsString(Args);<br>
+ Diag(clang::diag::err_drv_invalid_arch_name) << A->getAsString(Args);<br>
continue;<br>
}<br>
<br>
@@ -918,7 +914,7 @@ void Driver::BuildUniversalActions(const<br>
<br>
if (Archs.size() > 1 && !types::canLipoType(Act->getType()))<br>
Diag(clang::diag::err_drv_invalid_output_with_multiple_archs)<br>
- << types::getTypeName(Act->getType());<br>
+ << types::getTypeName(Act->getType());<br>
<br>
ActionList Inputs;<br>
for (unsigned i = 0, e = Archs.size(); i != e; ++i) {<br>
@@ -1008,10 +1004,11 @@ void Driver::BuildInputs(const ToolChain<br>
options::OPT__SLASH_TP)) {<br>
InputTypeArg = TCTP;<br>
InputType = TCTP->getOption().matches(options::OPT__SLASH_TC)<br>
- ? types::TY_C : types::TY_CXX;<br>
+ ? types::TY_C<br>
+ : types::TY_CXX;<br>
<br>
- arg_iterator it = Args.filtered_begin(options::OPT__SLASH_TC,<br>
- options::OPT__SLASH_TP);<br>
+ arg_iterator it =<br>
+ Args.filtered_begin(options::OPT__SLASH_TC, options::OPT__SLASH_TP);<br>
const arg_iterator ie = Args.filtered_end();<br>
Arg *Previous = *it++;<br>
bool ShowNote = false;<br>
@@ -1073,7 +1070,7 @@ void Driver::BuildInputs(const ToolChain<br>
<br>
if (Ty != OldTy)<br>
Diag(clang::diag::warn_drv_treating_input_as_cxx)<br>
- << getTypeName(OldTy) << getTypeName(Ty);<br>
+ << getTypeName(OldTy) << getTypeName(Ty);<br>
}<br>
}<br>
<br>
@@ -1175,7 +1172,7 @@ void Driver::BuildActions(const ToolChai<br>
!llvm::sys::path::is_separator(V.back())) {<br>
// Check whether /Fo tries to name an output file for multiple inputs.<br>
Diag(clang::diag::err_drv_out_file_argument_with_multiple_sources)<br>
- << A->getSpelling() << V;<br>
+ << A->getSpelling() << V;<br>
Args.eraseArg(options::OPT__SLASH_Fo);<br>
}<br>
}<br>
@@ -1187,7 +1184,7 @@ void Driver::BuildActions(const ToolChai<br>
!llvm::sys::path::is_separator(V.back())) {<br>
// Check whether /Fa tries to name an asm file for multiple inputs.<br>
Diag(clang::diag::err_drv_out_file_argument_with_multiple_sources)<br>
- << A->getSpelling() << V;<br>
+ << A->getSpelling() << V;<br>
Args.eraseArg(options::OPT__SLASH_Fa);<br>
}<br>
}<br>
@@ -1227,30 +1224,27 @@ void Driver::BuildActions(const ToolChai<br>
// by a command-line argument with a corresponding Arg.<br>
if (CCCIsCPP())<br>
Diag(clang::diag::warn_drv_input_file_unused_by_cpp)<br>
- << InputArg->getAsString(Args)<br>
- << getPhaseName(InitialPhase);<br>
+ << InputArg->getAsString(Args) << getPhaseName(InitialPhase);<br>
// Special case '-E' warning on a previously preprocessed file to make<br>
// more sense.<br>
else if (InitialPhase == phases::Compile &&<br>
FinalPhase == phases::Preprocess &&<br>
getPreprocessedType(InputType) == types::TY_INVALID)<br>
Diag(clang::diag::warn_drv_preprocessed_input_file_unused)<br>
- << InputArg->getAsString(Args)<br>
- << !!FinalPhaseArg<br>
- << (FinalPhaseArg ? FinalPhaseArg->getOption().getName() : "");<br>
+ << InputArg->getAsString(Args) << !!FinalPhaseArg<br>
+ << (FinalPhaseArg ? FinalPhaseArg->getOption().getName() : "");<br>
else<br>
Diag(clang::diag::warn_drv_input_file_unused)<br>
- << InputArg->getAsString(Args)<br>
- << getPhaseName(InitialPhase)<br>
- << !!FinalPhaseArg<br>
- << (FinalPhaseArg ? FinalPhaseArg->getOption().getName() : "");<br>
+ << InputArg->getAsString(Args) << getPhaseName(InitialPhase)<br>
+ << !!FinalPhaseArg<br>
+ << (FinalPhaseArg ? FinalPhaseArg->getOption().getName() : "");<br>
continue;<br>
}<br>
<br>
// Build the pipeline for this file.<br>
std::unique_ptr<Action> Current(new InputAction(*InputArg, InputType));<br>
- for (SmallVectorImpl<phases::ID>::iterator<br>
- i = PL.begin(), e = PL.end(); i != e; ++i) {<br>
+ for (SmallVectorImpl<phases::ID>::iterator i = PL.begin(), e = PL.end();<br>
+ i != e; ++i) {<br>
phases::ID Phase = *i;<br>
<br>
// We are done if this step is past what the user requested.<br>
@@ -1303,7 +1297,8 @@ Driver::ConstructPhaseAction(const ToolC<br>
llvm::PrettyStackTraceString CrashInfo("Constructing phase actions");<br>
// Build the appropriate action.<br>
switch (Phase) {<br>
- case phases::Link: llvm_unreachable("link action invalid here.");<br>
+ case phases::Link:<br>
+ llvm_unreachable("link action invalid here.");<br>
case phases::Preprocess: {<br>
types::ID OutputTy;<br>
// -{M, MM} alter the output type.<br>
@@ -1359,12 +1354,12 @@ Driver::ConstructPhaseAction(const ToolC<br>
case phases::Backend: {<br>
if (IsUsingLTO(Args)) {<br>
types::ID Output =<br>
- Args.hasArg(options::OPT_S) ? types::TY_LTO_IR : types::TY_LTO_BC;<br>
+ Args.hasArg(options::OPT_S) ? types::TY_LTO_IR : types::TY_LTO_BC;<br>
return llvm::make_unique<BackendJobAction>(std::move(Input), Output);<br>
}<br>
if (Args.hasArg(options::OPT_emit_llvm)) {<br>
types::ID Output =<br>
- Args.hasArg(options::OPT_S) ? types::TY_LLVM_IR : types::TY_LLVM_BC;<br>
+ Args.hasArg(options::OPT_S) ? types::TY_LLVM_IR : types::TY_LLVM_BC;<br>
return llvm::make_unique<BackendJobAction>(std::move(Input), Output);<br>
}<br>
return llvm::make_unique<BackendJobAction>(std::move(Input),<br>
@@ -1425,11 +1420,10 @@ void Driver::BuildJobs(Compilation &C) c<br>
<br>
InputInfo II;<br>
BuildJobsForAction(C, A, &C.getDefaultToolChain(),<br>
- /*BoundArch*/nullptr,<br>
+ /*BoundArch*/ nullptr,<br>
/*AtTopLevel*/ true,<br>
/*MultipleArchs*/ ArchNames.size() > 1,<br>
- /*LinkingOutput*/ LinkingOutput,<br>
- II);<br>
+ /*LinkingOutput*/ LinkingOutput, II);<br>
}<br>
<br>
// If the user passed -Qunused-arguments or there were errors, don't warn<br>
@@ -1439,10 +1433,10 @@ void Driver::BuildJobs(Compilation &C) c<br>
return;<br>
<br>
// Claim -### here.<br>
- (void) C.getArgs().hasArg(options::OPT__HASH_HASH_HASH);<br>
+ (void)C.getArgs().hasArg(options::OPT__HASH_HASH_HASH);<br>
<br>
// Claim --driver-mode, it was handled earlier.<br>
- (void) C.getArgs().hasArg(options::OPT_driver_mode);<br>
+ (void)C.getArgs().hasArg(options::OPT_driver_mode);<br>
<br>
for (Arg *A : C.getArgs()) {<br>
// FIXME: It would be nice to be able to send the argument to the<br>
@@ -1470,7 +1464,7 @@ void Driver::BuildJobs(Compilation &C) c<br>
}<br>
<br>
Diag(clang::diag::warn_drv_unused_argument)<br>
- << A->getAsString(C.getArgs());<br>
+ << A->getAsString(C.getArgs());<br>
}<br>
}<br>
}<br>
@@ -1484,13 +1478,12 @@ static const Tool *SelectToolForJob(Comp<br>
// bottom up, so what we are actually looking for is an assembler job with a<br>
// compiler input.<br>
<br>
- if (TC->useIntegratedAs() &&<br>
- !SaveTemps &&<br>
+ if (TC->useIntegratedAs() && !SaveTemps &&<br>
!C.getArgs().hasArg(options::OPT_via_file_asm) &&<br>
!C.getArgs().hasArg(options::OPT__SLASH_FA) &&<br>
!C.getArgs().hasArg(options::OPT__SLASH_Fa) &&<br>
- isa<AssembleJobAction>(JA) &&<br>
- Inputs->size() == 1 && isa<BackendJobAction>(*Inputs->begin())) {<br>
+ isa<AssembleJobAction>(JA) && Inputs->size() == 1 &&<br>
+ isa<BackendJobAction>(*Inputs->begin())) {<br>
// A BackendJob is always preceded by a CompileJob, and without<br>
// -save-temps they will always get combined together, so instead of<br>
// checking the backend tool, check if the tool for the CompileJob<br>
@@ -1531,8 +1524,7 @@ static const Tool *SelectToolForJob(Comp<br>
// (irrelevant since we don't support combine yet).<br>
if (Inputs->size() == 1 && isa<PreprocessJobAction>(*Inputs->begin()) &&<br>
!C.getArgs().hasArg(options::OPT_no_integrated_cpp) &&<br>
- !C.getArgs().hasArg(options::OPT_traditional_cpp) &&<br>
- !SaveTemps &&<br>
+ !C.getArgs().hasArg(options::OPT_traditional_cpp) && !SaveTemps &&<br>
!C.getArgs().hasArg(options::OPT_rewrite_objc) &&<br>
ToolForJob->hasIntegratedCPP())<br>
Inputs = &(*Inputs)[0]->getInputs();<br>
@@ -1540,12 +1532,9 @@ static const Tool *SelectToolForJob(Comp<br>
return ToolForJob;<br>
}<br>
<br>
-void Driver::BuildJobsForAction(Compilation &C,<br>
- const Action *A,<br>
- const ToolChain *TC,<br>
- const char *BoundArch,<br>
- bool AtTopLevel,<br>
- bool MultipleArchs,<br>
+void Driver::BuildJobsForAction(Compilation &C, const Action *A,<br>
+ const ToolChain *TC, const char *BoundArch,<br>
+ bool AtTopLevel, bool MultipleArchs,<br>
const char *LinkingOutput,<br>
InputInfo &Result) const {<br>
llvm::PrettyStackTraceString CrashInfo("Building compilation jobs");<br>
@@ -1573,8 +1562,8 @@ void Driver::BuildJobsForAction(Compilat<br>
else<br>
TC = &C.getDefaultToolChain();<br>
<br>
- BuildJobsForAction(C, *BAA->begin(), TC, BAA->getArchName(),<br>
- AtTopLevel, MultipleArchs, LinkingOutput, Result);<br>
+ BuildJobsForAction(C, *BAA->begin(), TC, BAA->getArchName(), AtTopLevel,<br>
+ MultipleArchs, LinkingOutput, Result);<br>
return;<br>
}<br>
<br>
@@ -<a href="tel:1642" value="+491642" target="_blank">1642</a>,7 +1631,8 @@ const char *Driver::getDefaultImageName(<br>
/// does not provide a filename, then use BaseName, and use the extension<br>
/// suitable for FileType.<br>
static const char *MakeCLOutputFilename(const ArgList &Args, StringRef ArgValue,<br>
- StringRef BaseName, types::ID FileType) {<br>
+ StringRef BaseName,<br>
+ types::ID FileType) {<br>
SmallString<128> Filename = ArgValue;<br>
<br>
if (ArgValue.empty()) {<br>
@@ -1669,16 +1659,13 @@ static const char *MakeCLOutputFilename(<br>
return Args.MakeArgString(Filename.c_str());<br>
}<br>
<br>
-const char *Driver::GetNamedOutputPath(Compilation &C,<br>
- const JobAction &JA,<br>
+const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA,<br>
const char *BaseInput,<br>
- const char *BoundArch,<br>
- bool AtTopLevel,<br>
+ const char *BoundArch, bool AtTopLevel,<br>
bool MultipleArchs) const {<br>
llvm::PrettyStackTraceString CrashInfo("Computing output path");<br>
// Output to a user requested destination?<br>
- if (AtTopLevel && !isa<DsymutilJobAction>(JA) &&<br>
- !isa<VerifyJobAction>(JA)) {<br>
+ if (AtTopLevel && !isa<DsymutilJobAction>(JA) && !isa<VerifyJobAction>(JA)) {<br>
if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o))<br>
return C.addResultFile(FinalOutput->getValue(), &JA);<br>
}<br>
@@ -<a href="tel:1690" value="+491690" target="_blank">1690</a>,8 +1677,9 @@ const char *Driver::GetNamedOutputPath(C<br>
StringRef NameArg;<br>
if (Arg *A = C.getArgs().getLastArg(options::OPT__SLASH_Fi))<br>
NameArg = A->getValue();<br>
- return C.addResultFile(MakeCLOutputFilename(C.getArgs(), NameArg, BaseName,<br>
- types::TY_PP_C), &JA);<br>
+ return C.addResultFile(<br>
+ MakeCLOutputFilename(C.getArgs(), NameArg, BaseName, types::TY_PP_C),<br>
+ &JA);<br>
}<br>
<br>
// Default to writing to stdout?<br>
@@ -1706,19 +1694,19 @@ const char *Driver::GetNamedOutputPath(C<br>
// Use /Fa and the input filename to determine the asm file name.<br>
StringRef BaseName = llvm::sys::path::filename(BaseInput);<br>
StringRef FaValue = C.getArgs().getLastArgValue(options::OPT__SLASH_Fa);<br>
- return C.addResultFile(MakeCLOutputFilename(C.getArgs(), FaValue, BaseName,<br>
- JA.getType()), &JA);<br>
+ return C.addResultFile(<br>
+ MakeCLOutputFilename(C.getArgs(), FaValue, BaseName, JA.getType()),<br>
+ &JA);<br>
}<br>
<br>
// Output to a temporary file?<br>
if ((!AtTopLevel && !isSaveTempsEnabled() &&<br>
- !C.getArgs().hasArg(options::OPT__SLASH_Fo)) ||<br>
+ !C.getArgs().hasArg(options::OPT__SLASH_Fo)) ||<br>
CCGenDiagnostics) {<br>
StringRef Name = llvm::sys::path::filename(BaseInput);<br>
std::pair<StringRef, StringRef> Split = Name.split('.');<br>
- std::string TmpName =<br>
- GetTemporaryPath(Split.first,<br>
- types::getTypeTempSuffix(JA.getType(), IsCLMode()));<br>
+ std::string TmpName = GetTemporaryPath(<br>
+ Split.first, types::getTypeTempSuffix(JA.getType(), IsCLMode()));<br>
return C.addTempFile(C.getArgs().MakeArgString(TmpName.c_str()));<br>
}<br>
<br>
@@ -1737,22 +1725,27 @@ const char *Driver::GetNamedOutputPath(C<br>
if (JA.getType() == types::TY_Object &&<br>
C.getArgs().hasArg(options::OPT__SLASH_Fo, options::OPT__SLASH_o)) {<br>
// The /Fo or /o flag decides the object filename.<br>
- StringRef Val = C.getArgs().getLastArg(options::OPT__SLASH_Fo,<br>
- options::OPT__SLASH_o)->getValue();<br>
- NamedOutput = MakeCLOutputFilename(C.getArgs(), Val, BaseName,<br>
- types::TY_Object);<br>
+ StringRef Val =<br>
+ C.getArgs()<br>
+ .getLastArg(options::OPT__SLASH_Fo, options::OPT__SLASH_o)<br>
+ ->getValue();<br>
+ NamedOutput =<br>
+ MakeCLOutputFilename(C.getArgs(), Val, BaseName, types::TY_Object);<br>
} else if (JA.getType() == types::TY_Image &&<br>
- C.getArgs().hasArg(options::OPT__SLASH_Fe, options::OPT__SLASH_o)) {<br>
+ C.getArgs().hasArg(options::OPT__SLASH_Fe,<br>
+ options::OPT__SLASH_o)) {<br>
// The /Fe or /o flag names the linked file.<br>
- StringRef Val = C.getArgs().getLastArg(options::OPT__SLASH_Fe,<br>
- options::OPT__SLASH_o)->getValue();<br>
- NamedOutput = MakeCLOutputFilename(C.getArgs(), Val, BaseName,<br>
- types::TY_Image);<br>
+ StringRef Val =<br>
+ C.getArgs()<br>
+ .getLastArg(options::OPT__SLASH_Fe, options::OPT__SLASH_o)<br>
+ ->getValue();<br>
+ NamedOutput =<br>
+ MakeCLOutputFilename(C.getArgs(), Val, BaseName, types::TY_Image);<br>
} else if (JA.getType() == types::TY_Image) {<br>
if (IsCLMode()) {<br>
// clang-cl uses BaseName for the executable name.<br>
- NamedOutput = MakeCLOutputFilename(C.getArgs(), "", BaseName,<br>
- types::TY_Image);<br>
+ NamedOutput =<br>
+ MakeCLOutputFilename(C.getArgs(), "", BaseName, types::TY_Image);<br>
} else if (MultipleArchs && BoundArch) {<br>
SmallString<128> Output(getDefaultImageName());<br>
Output += "-";<br>
@@ -1806,9 +1799,8 @@ const char *Driver::GetNamedOutputPath(C<br>
if (SameFile) {<br>
StringRef Name = llvm::sys::path::filename(BaseInput);<br>
std::pair<StringRef, StringRef> Split = Name.split('.');<br>
- std::string TmpName =<br>
- GetTemporaryPath(Split.first,<br>
- types::getTypeTempSuffix(JA.getType(), IsCLMode()));<br>
+ std::string TmpName = GetTemporaryPath(<br>
+ Split.first, types::getTypeTempSuffix(JA.getType(), IsCLMode()));<br>
return C.addTempFile(C.getArgs().MakeArgString(TmpName.c_str()));<br>
}<br>
}<br>
@@ -1855,9 +1847,9 @@ std::string Driver::GetFilePath(const ch<br>
return Name;<br>
}<br>
<br>
-void<br>
-Driver::generatePrefixedToolNames(const char *Tool, const ToolChain &TC,<br>
- SmallVectorImpl<std::string> &Names) const {<br>
+void Driver::generatePrefixedToolNames(<br>
+ const char *Tool, const ToolChain &TC,<br>
+ SmallVectorImpl<std::string> &Names) const {<br>
// FIXME: Needs a better variable than DefaultTargetTriple<br>
Names.emplace_back(DefaultTargetTriple + "-" + Tool);<br>
Names.emplace_back(Tool);<br>
@@ -1909,8 +1901,8 @@ std::string Driver::GetProgramPath(const<br>
return Name;<br>
}<br>
<br>
-std::string Driver::GetTemporaryPath(StringRef Prefix, const char *Suffix)<br>
- const {<br>
+std::string Driver::GetTemporaryPath(StringRef Prefix,<br>
+ const char *Suffix) const {<br>
SmallString<128> Path;<br>
std::error_code EC = llvm::sys::fs::createTemporaryFile(Prefix, Suffix, Path);<br>
if (EC) {<br>
@@ -1984,7 +1976,7 @@ static llvm::Triple computeTargetTriple(<br>
if (Target.getEnvironment() == llvm::Triple::GNUX32)<br>
Target.setEnvironment(llvm::Triple::GNU);<br>
} else if (A->getOption().matches(options::OPT_mx32) &&<br>
- Target.get64BitArchVariant().getArch() == llvm::Triple::x86_64) {<br>
+ Target.get64BitArchVariant().getArch() == llvm::Triple::x86_64) {<br>
AT = llvm::Triple::x86_64;<br>
Target.setEnvironment(llvm::Triple::GNUX32);<br>
} else if (A->getOption().matches(options::OPT_m32)) {<br>
@@ -1992,7 +1984,7 @@ static llvm::Triple computeTargetTriple(<br>
if (Target.getEnvironment() == llvm::Triple::GNUX32)<br>
Target.setEnvironment(llvm::Triple::GNU);<br>
} else if (A->getOption().matches(options::OPT_m16) &&<br>
- Target.get32BitArchVariant().getArch() == llvm::Triple::x86) {<br>
+ Target.get32BitArchVariant().getArch() == llvm::Triple::x86) {<br>
AT = llvm::Triple::x86;<br>
Target.setEnvironment(llvm::Triple::CODE16);<br>
}<br>
@@ -2102,8 +2094,7 @@ const ToolChain &Driver::getToolChain(co<br>
<br>
bool Driver::ShouldUseClangCompiler(const JobAction &JA) const {<br>
// Say "no" if there is not exactly one input of a type clang understands.<br>
- if (JA.size() != 1 ||<br>
- !types::isAcceptedByClang((*JA.begin())->getType()))<br>
+ if (JA.size() != 1 || !types::isAcceptedByClang((*JA.begin())->getType()))<br>
return false;<br>
<br>
// And say "no" if this is not a kind of action clang understands.<br>
@@ -2129,21 +2120,21 @@ bool Driver::GetReleaseVersion(const cha<br>
return false;<br>
<br>
char *End;<br>
- Major = (unsigned) strtol(Str, &End, 10);<br>
+ Major = (unsigned)strtol(Str, &End, 10);<br>
if (*Str != '\0' && *End == '\0')<br>
return true;<br>
if (*End != '.')<br>
return false;<br>
<br>
- Str = End+1;<br>
- Minor = (unsigned) strtol(Str, &End, 10);<br>
+ Str = End + 1;<br>
+ Minor = (unsigned)strtol(Str, &End, 10);<br>
if (*Str != '\0' && *End == '\0')<br>
return true;<br>
if (*End != '.')<br>
return false;<br>
<br>
- Str = End+1;<br>
- Micro = (unsigned) strtol(Str, &End, 10);<br>
+ Str = End + 1;<br>
+ Micro = (unsigned)strtol(Str, &End, 10);<br>
if (*Str != '\0' && *End == '\0')<br>
return true;<br>
if (Str == End)<br>
<br>
Modified: cfe/trunk/lib/Driver/ToolChains.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_lib_Driver_ToolChains.cpp-3Frev-3D240791-26r1-3D240790-26r2-3D240791-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=HQQNmbImUf4F-mcwxbN9TPWVeRmDPUPU4dZwwCB61Pk&s=WLNsTtev5Ph5hub_OPpO99miSigv8DxizT62UyJWRCc&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=240791&r1=240790&r2=240791&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)<br>
+++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Jun 26 10:47:46 2015<br>
@@ -39,9 +39,8 @@ using namespace clang::driver::toolchain<br>
using namespace clang;<br>
using namespace llvm::opt;<br>
<br>
-MachO::MachO(const Driver &D, const llvm::Triple &Triple,<br>
- const ArgList &Args)<br>
- : ToolChain(D, Triple, Args) {<br>
+MachO::MachO(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)<br>
+ : ToolChain(D, Triple, Args) {<br>
// We expect 'as', 'ld', etc. to be adjacent to our install dir.<br>
getProgramPaths().push_back(getDriver().getInstalledDir());<br>
if (getDriver().getInstalledDir() != getDriver().Dir)<br>
@@ -62,9 +61,7 @@ types::ID MachO::LookupTypeForExtension(<br>
return Ty;<br>
}<br>
<br>
-bool MachO::HasNativeLLVMSupport() const {<br>
- return true;<br>
-}<br>
+bool MachO::HasNativeLLVMSupport() const { return true; }<br>
<br>
/// Darwin provides an ARC runtime starting in MacOS X 10.7 and iOS 5.0.<br>
ObjCRuntime Darwin::getDefaultObjCRuntime(bool isNonFragile) const {<br>
@@ -90,20 +87,20 @@ bool Darwin::hasBlocksRuntime() const {<br>
// other assumptions. Maybe MachO should consider standardising<br>
// their nomenclature.<br>
static const char *ArmMachOArchName(StringRef Arch) {<br>
- return llvm::StringSwitch<const char*>(Arch)<br>
- .Case("armv6k", "armv6")<br>
- .Case("armv6m", "armv6m")<br>
- .Case("armv5tej", "armv5")<br>
- .Case("xscale", "xscale")<br>
- .Case("armv4t", "armv4t")<br>
- .Case("armv7", "armv7")<br>
- .Cases("armv7a", "armv7-a", "armv7")<br>
- .Cases("armv7r", "armv7-r", "armv7")<br>
- .Cases("armv7em", "armv7e-m", "armv7em")<br>
- .Cases("armv7k", "armv7-k", "armv7k")<br>
- .Cases("armv7m", "armv7-m", "armv7m")<br>
- .Cases("armv7s", "armv7-s", "armv7s")<br>
- .Default(nullptr);<br>
+ return llvm::StringSwitch<const char *>(Arch)<br>
+ .Case("armv6k", "armv6")<br>
+ .Case("armv6m", "armv6m")<br>
+ .Case("armv5tej", "armv5")<br>
+ .Case("xscale", "xscale")<br>
+ .Case("armv4t", "armv4t")<br>
+ .Case("armv7", "armv7")<br>
+ .Cases("armv7a", "armv7-a", "armv7")<br>
+ .Cases("armv7r", "armv7-r", "armv7")<br>
+ .Cases("armv7em", "armv7e-m", "armv7em")<br>
+ .Cases("armv7k", "armv7-k", "armv7k")<br>
+ .Cases("armv7m", "armv7-m", "armv7m")<br>
+ .Cases("armv7s", "armv7-s", "armv7s")<br>
+ .Default(nullptr);<br>
}<br>
<br>
static const char *ArmMachOArchNameCPU(StringRef CPU) {<br>
@@ -159,15 +156,12 @@ StringRef MachO::getMachOArchName(const<br>
}<br>
}<br>
<br>
-Darwin::~Darwin() {<br>
-}<br>
-<br>
-MachO::~MachO() {<br>
-}<br>
+Darwin::~Darwin() {}<br>
<br>
+MachO::~MachO() {}<br>
<br>
std::string MachO::ComputeEffectiveClangTriple(const ArgList &Args,<br>
- types::ID InputType) const {<br>
+ types::ID InputType) const {<br>
llvm::Triple Triple(ComputeLLVMTriple(Args, InputType));<br>
<br>
return Triple.getTriple();<br>
@@ -305,7 +299,7 @@ void MachO::AddLinkRuntimeLib(const ArgL<br>
}<br>
<br>
void Darwin::addProfileRTLibs(const ArgList &Args,<br>
- ArgStringList &CmdArgs) const {<br>
+ ArgStringList &CmdArgs) const {<br>
if (!(Args.hasFlag(options::OPT_fprofile_arcs, options::OPT_fno_profile_arcs,<br>
false) ||<br>
Args.hasArg(options::OPT_fprofile_generate) ||<br>
@@ -334,10 +328,11 @@ void DarwinClang::AddLinkSanitizerLibArg<br>
}<br>
assert(isTargetMacOS() || isTargetIOSSimulator());<br>
StringRef OS = isTargetMacOS() ? "osx" : "iossim";<br>
- AddLinkRuntimeLib(Args, CmdArgs, (Twine("libclang_rt.") + Sanitizer + "_" +<br>
- OS + "_dynamic.dylib").str(),<br>
- /*AlwaysLink*/ true, /*IsEmbedded*/ false,<br>
- /*AddRPath*/ true);<br>
+ AddLinkRuntimeLib(<br>
+ Args, CmdArgs,<br>
+ (Twine("libclang_rt.") + Sanitizer + "_" + OS + "_dynamic.dylib").str(),<br>
+ /*AlwaysLink*/ true, /*IsEmbedded*/ false,<br>
+ /*AddRPath*/ true);<br>
<br>
if (GetCXXStdlibType(Args) == ToolChain::CST_Libcxx) {<br>
// Add explicit dependcy on -lc++abi, as -lc++ doesn't re-export<br>
@@ -354,7 +349,7 @@ void DarwinClang::AddLinkRuntimeLibArgs(<br>
break;<br>
default:<br>
getDriver().Diag(diag::err_drv_unsupported_rtlib_for_platform)<br>
- << Args.getLastArg(options::OPT_rtlib_EQ)->getValue() << "darwin";<br>
+ << Args.getLastArg(options::OPT_rtlib_EQ)->getValue() << "darwin";<br>
return;<br>
}<br>
<br>
@@ -369,12 +364,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(<br>
// cares. This is useful in situations where someone wants to statically link<br>
// something like libstdc++, and needs its runtime support routines.<br>
if (const Arg *A = Args.getLastArg(options::OPT_static_libgcc)) {<br>
- getDriver().Diag(diag::err_drv_unsupported_opt)<br>
- << A->getAsString(Args);<br>
+ getDriver().Diag(diag::err_drv_unsupported_opt) << A->getAsString(Args);<br>
return;<br>
}<br>
<br>
-<br>
const SanitizerArgs &Sanitize = getSanitizerArgs();<br>
if (Sanitize.needsAsanRt())<br>
AddLinkSanitizerLibArgs(Args, CmdArgs, "asan");<br>
@@ -440,7 +433,7 @@ void Darwin::AddDeploymentTarget(Derived<br>
if (llvm::sys::path::is_absolute(env) && llvm::sys::fs::exists(env) &&<br>
StringRef(env) != "/") {<br>
Args.append(Args.MakeSeparateArg(<br>
- nullptr, Opts.getOption(options::OPT_isysroot), env));<br>
+ nullptr, Opts.getOption(options::OPT_isysroot), env));<br>
}<br>
}<br>
}<br>
@@ -450,8 +443,7 @@ void Darwin::AddDeploymentTarget(Derived<br>
<br>
if (OSXVersion && iOSVersion) {<br>
getDriver().Diag(diag::err_drv_argument_not_allowed_with)<br>
- << OSXVersion->getAsString(Args)<br>
- << iOSVersion->getAsString(Args);<br>
+ << OSXVersion->getAsString(Args) << iOSVersion->getAsString(Args);<br>
iOSVersion = nullptr;<br>
} else if (!OSXVersion && !iOSVersion) {<br>
// If no deployment target was specified on the command line, check for<br>
@@ -547,18 +539,18 @@ void Darwin::AddDeploymentTarget(Derived<br>
bool HadExtra;<br>
if (Platform == MacOS) {<br>
assert(!iOSVersion && "Unknown target platform!");<br>
- if (!Driver::GetReleaseVersion(OSXVersion->getValue(), Major, Minor,<br>
- Micro, HadExtra) || HadExtra ||<br>
- Major != 10 || Minor >= 100 || Micro >= 100)<br>
+ if (!Driver::GetReleaseVersion(OSXVersion->getValue(), Major, Minor, Micro,<br>
+ HadExtra) ||<br>
+ HadExtra || Major != 10 || Minor >= 100 || Micro >= 100)<br>
getDriver().Diag(diag::err_drv_invalid_version_number)<br>
- << OSXVersion->getAsString(Args);<br>
+ << OSXVersion->getAsString(Args);<br>
} else if (Platform == IPhoneOS) {<br>
assert(iOSVersion && "Unknown target platform!");<br>
- if (!Driver::GetReleaseVersion(iOSVersion->getValue(), Major, Minor,<br>
- Micro, HadExtra) || HadExtra ||<br>
- Major >= 10 || Minor >= 100 || Micro >= 100)<br>
+ if (!Driver::GetReleaseVersion(iOSVersion->getValue(), Major, Minor, Micro,<br>
+ HadExtra) ||<br>
+ HadExtra || Major >= 10 || Minor >= 100 || Micro >= 100)<br>
getDriver().Diag(diag::err_drv_invalid_version_number)<br>
- << iOSVersion->getAsString(Args);<br>
+ << iOSVersion->getAsString(Args);<br>
} else<br>
llvm_unreachable("unknown kind of Darwin platform");<br>
<br>
@@ -658,10 +650,11 @@ DerivedArgList *MachO::TranslateArgs(con<br>
// Skip this argument unless the architecture matches either the toolchain<br>
// triple arch, or the arch being bound.<br>
llvm::Triple::ArchType XarchArch =<br>
- tools::darwin::getArchTypeForMachOArchName(A->getValue(0));<br>
- if (!(XarchArch == getArch() ||<br>
- (BoundArch && XarchArch ==<br>
- tools::darwin::getArchTypeForMachOArchName(BoundArch))))<br>
+ tools::darwin::getArchTypeForMachOArchName(A->getValue(0));<br>
+ if (!(XarchArch == getArch() ||<br>
+ (BoundArch &&<br>
+ XarchArch ==<br>
+ tools::darwin::getArchTypeForMachOArchName(BoundArch))))<br>
continue;<br>
<br>
Arg *OriginalArg = A;<br>
@@ -679,11 +672,11 @@ DerivedArgList *MachO::TranslateArgs(con<br>
// like -O4 are going to slip through.<br>
if (!XarchArg || Index > Prev + 1) {<br>
getDriver().Diag(diag::err_drv_invalid_Xarch_argument_with_args)<br>
- << A->getAsString(Args);<br>
+ << A->getAsString(Args);<br>
continue;<br>
} else if (XarchArg->getOption().hasFlag(options::DriverOption)) {<br>
getDriver().Diag(diag::err_drv_invalid_Xarch_argument_isdriver)<br>
- << A->getAsString(Args);<br>
+ << A->getAsString(Args);<br>
continue;<br>
}<br>
<br>
@@ -708,7 +701,7 @@ DerivedArgList *MachO::TranslateArgs(con<br>
// Sob. These is strictly gcc compatible for the time being. Apple<br>
// gcc translates options twice, which means that self-expanding<br>
// options add duplicates.<br>
- switch ((options::ID) A->getOption().getID()) {<br>
+ switch ((options::ID)A->getOption().getID()) {<br>
default:<br>
DAL->append(A);<br>
break;<br>
@@ -720,20 +713,19 @@ DerivedArgList *MachO::TranslateArgs(con<br>
break;<br>
<br>
case options::OPT_dependency_file:<br>
- DAL->AddSeparateArg(A, Opts.getOption(options::OPT_MF),<br>
- A->getValue());<br>
+ DAL->AddSeparateArg(A, Opts.getOption(options::OPT_MF), A->getValue());<br>
break;<br>
<br>
case options::OPT_gfull:<br>
DAL->AddFlagArg(A, Opts.getOption(options::OPT_g_Flag));<br>
- DAL->AddFlagArg(A,<br>
- Opts.getOption(options::OPT_fno_eliminate_unused_debug_symbols));<br>
+ DAL->AddFlagArg(<br>
+ A, Opts.getOption(options::OPT_fno_eliminate_unused_debug_symbols));<br>
break;<br>
<br>
case options::OPT_gused:<br>
DAL->AddFlagArg(A, Opts.getOption(options::OPT_g_Flag));<br>
- DAL->AddFlagArg(A,<br>
- Opts.getOption(options::OPT_feliminate_unused_debug_symbols));<br>
+ DAL->AddFlagArg(<br>
+ A, Opts.getOption(options::OPT_feliminate_unused_debug_symbols));<br>
break;<br>
<br>
case options::OPT_shared:<br>
@@ -754,8 +746,8 @@ DerivedArgList *MachO::TranslateArgs(con<br>
break;<br>
<br>
case options::OPT_Wno_nonportable_cfstrings:<br>
- DAL->AddFlagArg(A,<br>
- Opts.getOption(options::OPT_mno_warn_nonportable_cfstrings));<br>
+ DAL->AddFlagArg(<br>
+ A, Opts.getOption(options::OPT_mno_warn_nonportable_cfstrings));<br>
break;<br>
<br>
case options::OPT_fpascal_strings:<br>
@@ -871,7 +863,6 @@ void MachO::AddLinkRuntimeLibArgs(const<br>
AddLinkRuntimeLib(Args, CmdArgs, CompilerRT, false, true);<br>
}<br>
<br>
-<br>
DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args,<br>
const char *BoundArch) const {<br>
// First get the generic Apple args, before moving onto Darwin-specific ones.<br>
@@ -892,7 +883,7 @@ DerivedArgList *Darwin::TranslateArgs(co<br>
// but we can't check the deployment target in the translation code until<br>
// it is set here.<br>
if (isTargetIOSBased() && !isIPhoneOSVersionLT(6, 0)) {<br>
- for (ArgList::iterator it = DAL->begin(), ie = DAL->end(); it != ie; ) {<br>
+ for (ArgList::iterator it = DAL->begin(), ie = DAL->end(); it != ie;) {<br>
Arg *A = *it;<br>
++it;<br>
if (A->getOption().getID() != options::OPT_mkernel &&<br>
@@ -924,8 +915,7 @@ DerivedArgList *Darwin::TranslateArgs(co<br>
where = "iOS 5.0";<br>
<br>
if (where != StringRef()) {<br>
- getDriver().Diag(clang::diag::err_drv_invalid_libcxx_deployment)<br>
- << where;<br>
+ getDriver().Diag(clang::diag::err_drv_invalid_libcxx_deployment) << where;<br>
}<br>
}<br>
<br>
@@ -948,13 +938,9 @@ bool Darwin::UseSjLjExceptions() const {<br>
getTriple().getArch() == llvm::Triple::thumb);<br>
}<br>
<br>
-bool MachO::isPICDefault() const {<br>
- return true;<br>
-}<br>
+bool MachO::isPICDefault() const { return true; }<br>
<br>
-bool MachO::isPIEDefault() const {<br>
- return false;<br>
-}<br>
+bool MachO::isPIEDefault() const { return false; }<br>
<br>
bool MachO::isPICDefaultForced() const {<br>
return (getArch() == llvm::Triple::x86_64 ||<br>
@@ -1068,12 +1054,10 @@ void Darwin::addStartObjectFileArgs(cons<br>
}<br>
}<br>
<br>
-bool Darwin::SupportsObjCGC() const {<br>
- return isTargetMacOS();<br>
-}<br>
+bool Darwin::SupportsObjCGC() const { return isTargetMacOS(); }<br>
<br>
void Darwin::CheckObjCARC() const {<br>
- if (isTargetIOSBased()|| (isTargetMacOS() && !isMacosxVersionLT(10, 6)))<br>
+ if (isTargetIOSBased() || (isTargetMacOS() && !isMacosxVersionLT(10, 6)))<br>
return;<br>
getDriver().Diag(diag::err_arc_unsupported_on_toolchain);<br>
}<br>
@@ -1099,17 +1083,15 @@ SanitizerMask Darwin::getSupportedSaniti<br>
/// This is the primary means of forming GCCVersion objects.<br>
/*static*/<br>
Generic_GCC::GCCVersion Linux::GCCVersion::Parse(StringRef VersionText) {<br>
- const GCCVersion BadVersion = { VersionText.str(), -1, -1, -1, "", "", "" };<br>
+ const GCCVersion BadVersion = {VersionText.str(), -1, -1, -1, "", "", ""};<br>
std::pair<StringRef, StringRef> First = VersionText.split('.');<br>
std::pair<StringRef, StringRef> Second = First.second.split('.');<br>
<br>
- GCCVersion GoodVersion = { VersionText.str(), -1, -1, -1, "", "", "" };<br>
- if (First.first.getAsInteger(10, GoodVersion.Major) ||<br>
- GoodVersion.Major < 0)<br>
+ GCCVersion GoodVersion = {VersionText.str(), -1, -1, -1, "", "", ""};<br>
+ if (First.first.getAsInteger(10, GoodVersion.Major) || GoodVersion.Major < 0)<br>
return BadVersion;<br>
GoodVersion.MajorStr = First.first.str();<br>
- if (Second.first.getAsInteger(10, GoodVersion.Minor) ||<br>
- GoodVersion.Minor < 0)<br>
+ if (Second.first.getAsInteger(10, GoodVersion.Minor) || GoodVersion.Minor < 0)<br>
return BadVersion;<br>
GoodVersion.MinorStr = Second.first.str();<br>
<br>
@@ -1186,12 +1168,11 @@ static llvm::StringRef getGCCToolchainDi<br>
/// should instead pull the target out of the driver. This is currently<br>
/// necessary because the driver doesn't store the final version of the target<br>
/// triple.<br>
-void<br>
-Generic_GCC::GCCInstallationDetector::init(<br>
+void Generic_GCC::GCCInstallationDetector::init(<br>
const Driver &D, const llvm::Triple &TargetTriple, const ArgList &Args) {<br>
- llvm::Triple BiarchVariantTriple =<br>
- TargetTriple.isArch32Bit() ? TargetTriple.get64BitArchVariant()<br>
- : TargetTriple.get32BitArchVariant();<br>
+ llvm::Triple BiarchVariantTriple = TargetTriple.isArch32Bit()<br>
+ ? TargetTriple.get64BitArchVariant()<br>
+ : TargetTriple.get32BitArchVariant();<br>
// The library directories which may contain GCC installations.<br>
SmallVector<StringRef, 4> CandidateLibDirs, CandidateBiarchLibDirs;<br>
// The compatible GCC triples for this particular architecture.<br>
@@ -1281,91 +1262,82 @@ bool Generic_GCC::GCCInstallationDetecto<br>
// Declare a bunch of static data sets that we'll select between below. These<br>
// are specifically designed to always refer to string literals to avoid any<br>
// lifetime or initialization issues.<br>
- static const char *const AArch64LibDirs[] = { "/lib64", "/lib" };<br>
- static const char *const AArch64Triples[] = { "aarch64-none-linux-gnu",<br>
- "aarch64-linux-gnu",<br>
- "aarch64-linux-android",<br>
- "aarch64-redhat-linux" };<br>
- static const char *const AArch64beLibDirs[] = { "/lib" };<br>
- static const char *const AArch64beTriples[] = { "aarch64_be-none-linux-gnu",<br>
- "aarch64_be-linux-gnu" };<br>
-<br>
- static const char *const ARMLibDirs[] = { "/lib" };<br>
- static const char *const ARMTriples[] = { "arm-linux-gnueabi",<br>
- "arm-linux-androideabi" };<br>
- static const char *const ARMHFTriples[] = { "arm-linux-gnueabihf",<br>
- "armv7hl-redhat-linux-gnueabi" };<br>
- static const char *const ARMebLibDirs[] = { "/lib" };<br>
- static const char *const ARMebTriples[] = { "armeb-linux-gnueabi",<br>
- "armeb-linux-androideabi" };<br>
- static const char *const ARMebHFTriples[] = { "armeb-linux-gnueabihf",<br>
- "armebv7hl-redhat-linux-gnueabi" };<br>
+ static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};<br>
+ static const char *const AArch64Triples[] = {<br>
+ "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-linux-android",<br>
+ "aarch64-redhat-linux"};<br>
+ static const char *const AArch64beLibDirs[] = {"/lib"};<br>
+ static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",<br>
+ "aarch64_be-linux-gnu"};<br>
+<br>
+ static const char *const ARMLibDirs[] = {"/lib"};<br>
+ static const char *const ARMTriples[] = {"arm-linux-gnueabi",<br>
+ "arm-linux-androideabi"};<br>
+ static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",<br>
+ "armv7hl-redhat-linux-gnueabi"};<br>
+ static const char *const ARMebLibDirs[] = {"/lib"};<br>
+ static const char *const ARMebTriples[] = {"armeb-linux-gnueabi",<br>
+ "armeb-linux-androideabi"};<br>
+ static const char *const ARMebHFTriples[] = {<br>
+ "armeb-linux-gnueabihf", "armebv7hl-redhat-linux-gnueabi"};<br>
<br>
- static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };<br>
+ static const char *const X86_64LibDirs[] = {"/lib64", "/lib"};<br>
static const char *const X86_64Triples[] = {<br>
- "x86_64-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-pc-linux-gnu",<br>
- "x86_64-redhat-linux6E", "x86_64-redhat-linux", "x86_64-suse-linux",<br>
- "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux",<br>
- "x86_64-linux-android", "x86_64-unknown-linux"<br>
- };<br>
- static const char *const X32LibDirs[] = { "/libx32" };<br>
- static const char *const X86LibDirs[] = { "/lib32", "/lib" };<br>
+ "x86_64-linux-gnu", "x86_64-unknown-linux-gnu",<br>
+ "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E",<br>
+ "x86_64-redhat-linux", "x86_64-suse-linux",<br>
+ "x86_64-manbo-linux-gnu", "x86_64-linux-gnu",<br>
+ "x86_64-slackware-linux", "x86_64-linux-android",<br>
+ "x86_64-unknown-linux"};<br>
+ static const char *const X32LibDirs[] = {"/libx32"};<br>
+ static const char *const X86LibDirs[] = {"/lib32", "/lib"};<br>
static const char *const X86Triples[] = {<br>
- "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu", "i386-linux-gnu",<br>
- "i386-redhat-linux6E", "i686-redhat-linux", "i586-redhat-linux",<br>
- "i386-redhat-linux", "i586-suse-linux", "i486-slackware-linux",<br>
- "i686-montavista-linux", "i686-linux-android", "i586-linux-gnu"<br>
- };<br>
-<br>
- static const char *const MIPSLibDirs[] = { "/lib" };<br>
- static const char *const MIPSTriples[] = { "mips-linux-gnu",<br>
- "mips-mti-linux-gnu",<br>
- "mips-img-linux-gnu" };<br>
- static const char *const MIPSELLibDirs[] = { "/lib" };<br>
- static const char *const MIPSELTriples[] = { "mipsel-linux-gnu",<br>
- "mipsel-linux-android",<br>
- "mips-img-linux-gnu" };<br>
-<br>
- static const char *const MIPS64LibDirs[] = { "/lib64", "/lib" };<br>
- static const char *const MIPS64Triples[] = { "mips64-linux-gnu",<br>
- "mips-mti-linux-gnu",<br>
- "mips-img-linux-gnu",<br>
- "mips64-linux-gnuabi64" };<br>
- static const char *const MIPS64ELLibDirs[] = { "/lib64", "/lib" };<br>
- static const char *const MIPS64ELTriples[] = { "mips64el-linux-gnu",<br>
- "mips-mti-linux-gnu",<br>
- "mips-img-linux-gnu",<br>
- "mips64el-linux-android",<br>
- "mips64el-linux-gnuabi64" };<br>
+ "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu",<br>
+ "i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux",<br>
+ "i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",<br>
+ "i486-slackware-linux", "i686-montavista-linux", "i686-linux-android",<br>
+ "i586-linux-gnu"};<br>
+<br>
+ static const char *const MIPSLibDirs[] = {"/lib"};<br>
+ static const char *const MIPSTriples[] = {<br>
+ "mips-linux-gnu", "mips-mti-linux-gnu", "mips-img-linux-gnu"};<br>
+ static const char *const MIPSELLibDirs[] = {"/lib"};<br>
+ static const char *const MIPSELTriples[] = {<br>
+ "mipsel-linux-gnu", "mipsel-linux-android", "mips-img-linux-gnu"};<br>
+<br>
+ static const char *const MIPS64LibDirs[] = {"/lib64", "/lib"};<br>
+ static const char *const MIPS64Triples[] = {<br>
+ "mips64-linux-gnu", "mips-mti-linux-gnu", "mips-img-linux-gnu",<br>
+ "mips64-linux-gnuabi64"};<br>
+ static const char *const MIPS64ELLibDirs[] = {"/lib64", "/lib"};<br>
+ static const char *const MIPS64ELTriples[] = {<br>
+ "mips64el-linux-gnu", "mips-mti-linux-gnu", "mips-img-linux-gnu",<br>
+ "mips64el-linux-android", "mips64el-linux-gnuabi64"};<br>
<br>
- static const char *const PPCLibDirs[] = { "/lib32", "/lib" };<br>
+ static const char *const PPCLibDirs[] = {"/lib32", "/lib"};<br>
static const char *const PPCTriples[] = {<br>
- "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",<br>
- "powerpc-suse-linux", "powerpc-montavista-linuxspe"<br>
- };<br>
- static const char *const PPC64LibDirs[] = { "/lib64", "/lib" };<br>
- static const char *const PPC64Triples[] = { "powerpc64-linux-gnu",<br>
- "powerpc64-unknown-linux-gnu",<br>
- "powerpc64-suse-linux",<br>
- "ppc64-redhat-linux" };<br>
- static const char *const PPC64LELibDirs[] = { "/lib64", "/lib" };<br>
- static const char *const PPC64LETriples[] = { "powerpc64le-linux-gnu",<br>
- "powerpc64le-unknown-linux-gnu",<br>
- "powerpc64le-suse-linux",<br>
- "ppc64le-redhat-linux" };<br>
-<br>
- static const char *const SPARCv8LibDirs[] = { "/lib32", "/lib" };<br>
- static const char *const SPARCv8Triples[] = { "sparc-linux-gnu",<br>
- "sparcv8-linux-gnu" };<br>
- static const char *const SPARCv9LibDirs[] = { "/lib64", "/lib" };<br>
- static const char *const SPARCv9Triples[] = { "sparc64-linux-gnu",<br>
- "sparcv9-linux-gnu" };<br>
+ "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",<br>
+ "powerpc-suse-linux", "powerpc-montavista-linuxspe"};<br>
+ static const char *const PPC64LibDirs[] = {"/lib64", "/lib"};<br>
+ static const char *const PPC64Triples[] = {<br>
+ "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu",<br>
+ "powerpc64-suse-linux", "ppc64-redhat-linux"};<br>
+ static const char *const PPC64LELibDirs[] = {"/lib64", "/lib"};<br>
+ static const char *const PPC64LETriples[] = {<br>
+ "powerpc64le-linux-gnu", "powerpc64le-unknown-linux-gnu",<br>
+ "powerpc64le-suse-linux", "ppc64le-redhat-linux"};<br>
+<br>
+ static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};<br>
+ static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",<br>
+ "sparcv8-linux-gnu"};<br>
+ static const char *const SPARCv9LibDirs[] = {"/lib64", "/lib"};<br>
+ static const char *const SPARCv9Triples[] = {"sparc64-linux-gnu",<br>
+ "sparcv9-linux-gnu"};<br>
<br>
- static const char *const SystemZLibDirs[] = { "/lib64", "/lib" };<br>
+ static const char *const SystemZLibDirs[] = {"/lib64", "/lib"};<br>
static const char *const SystemZTriples[] = {<br>
- "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu",<br>
- "s390x-suse-linux", "s390x-redhat-linux"<br>
- };<br>
+ "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu",<br>
+ "s390x-suse-linux", "s390x-redhat-linux"};<br>
<br>
using std::begin;<br>
using std::end;<br>
@@ -1533,14 +1505,12 @@ static bool isMipsEL(llvm::Triple::ArchT<br>
}<br>
<br>
static bool isMips16(const ArgList &Args) {<br>
- Arg *A = Args.getLastArg(options::OPT_mips16,<br>
- options::OPT_mno_mips16);<br>
+ Arg *A = Args.getLastArg(options::OPT_mips16, options::OPT_mno_mips16);<br>
return A && A->getOption().matches(options::OPT_mips16);<br>
}<br>
<br>
static bool isMicroMips(const ArgList &Args) {<br>
- Arg *A = Args.getLastArg(options::OPT_mmicromips,<br>
- options::OPT_mno_micromips);<br>
+ Arg *A = Args.getLastArg(options::OPT_mmicromips, options::OPT_mno_micromips);<br>
return A && A->getOption().matches(options::OPT_mmicromips);<br>
}<br>
<br>
@@ -1561,8 +1531,7 @@ static Multilib makeMultilib(StringRef c<br>
}<br>
<br>
static bool findMIPSMultilibs(const llvm::Triple &TargetTriple, StringRef Path,<br>
- const ArgList &Args,<br>
- DetectedMultilibs &Result) {<br>
+ const ArgList &Args, DetectedMultilibs &Result) {<br>
// Some MIPS toolchains put libraries and object files compiled<br>
// using different options in to the sub-directoris which names<br>
// reflects the flags used for compilation. For example sysroot<br>
@@ -1594,181 +1563,182 @@ static bool findMIPSMultilibs(const llvm<br>
MultilibSet FSFMipsMultilibs;<br>
{<br>
auto MArchMips32 = makeMultilib("/mips32")<br>
- .flag("+m32").flag("-m64").flag("-mmicromips").flag("+march=mips32");<br>
+ .flag("+m32")<br>
+ .flag("-m64")<br>
+ .flag("-mmicromips")<br>
+ .flag("+march=mips32");<br>
<br>
auto MArchMicroMips = makeMultilib("/micromips")<br>
- .flag("+m32").flag("-m64").flag("+mmicromips");<br>
+ .flag("+m32")<br>
+ .flag("-m64")<br>
+ .flag("+mmicromips");<br>
<br>
auto MArchMips64r2 = makeMultilib("/mips64r2")<br>
- .flag("-m32").flag("+m64").flag("+march=mips64r2");<br>
+ .flag("-m32")<br>
+ .flag("+m64")<br>
+ .flag("+march=mips64r2");<br>
<br>
- auto MArchMips64 = makeMultilib("/mips64")<br>
- .flag("-m32").flag("+m64").flag("-march=mips64r2");<br>
+ auto MArchMips64 = makeMultilib("/mips64").flag("-m32").flag("+m64").flag(<br>
+ "-march=mips64r2");<br>
<br>
auto MArchDefault = makeMultilib("")<br>
- .flag("+m32").flag("-m64").flag("-mmicromips").flag("+march=mips32r2");<br>
-<br>
- auto Mips16 = makeMultilib("/mips16")<br>
- .flag("+mips16");<br>
-<br>
- auto UCLibc = makeMultilib("/uclibc")<br>
- .flag("+muclibc");<br>
-<br>
- auto MAbi64 = makeMultilib("/64")<br>
- .flag("+mabi=n64").flag("-mabi=n32").flag("-m32");<br>
-<br>
- auto BigEndian = makeMultilib("")<br>
- .flag("+EB").flag("-EL");<br>
-<br>
- auto LittleEndian = makeMultilib("/el")<br>
- .flag("+EL").flag("-EB");<br>
-<br>
- auto SoftFloat = makeMultilib("/sof")<br>
- .flag("+msoft-float");<br>
-<br>
- auto Nan2008 = makeMultilib("/nan2008")<br>
- .flag("+mnan=2008");<br>
-<br>
- FSFMipsMultilibs = MultilibSet()<br>
- .Either(MArchMips32, MArchMicroMips,<br>
- MArchMips64r2, MArchMips64, MArchDefault)<br>
- .Maybe(UCLibc)<br>
- .Maybe(Mips16)<br>
- .FilterOut("/mips64/mips16")<br>
- .FilterOut("/mips64r2/mips16")<br>
- .FilterOut("/micromips/mips16")<br>
- .Maybe(MAbi64)<br>
- .FilterOut("/micromips/64")<br>
- .FilterOut("/mips32/64")<br>
- .FilterOut("^/64")<br>
- .FilterOut("/mips16/64")<br>
- .Either(BigEndian, LittleEndian)<br>
- .Maybe(SoftFloat)<br>
- .Maybe(Nan2008)<br>
- .FilterOut(".*sof/nan2008")<br>
- .FilterOut(NonExistent)<br>
- .setIncludeDirsCallback([](<br>
- StringRef InstallDir, StringRef TripleStr, const Multilib &M) {<br>
- std::vector<std::string> Dirs;<br>
- Dirs.push_back((InstallDir + "/include").str());<br>
- std::string SysRootInc = InstallDir.str() + "/../../../../sysroot";<br>
- if (StringRef(M.includeSuffix()).startswith("/uclibc"))<br>
- Dirs.push_back(SysRootInc + "/uclibc/usr/include");<br>
- else<br>
- Dirs.push_back(SysRootInc + "/usr/include");<br>
- return Dirs;<br>
- });<br>
+ .flag("+m32")<br>
+ .flag("-m64")<br>
+ .flag("-mmicromips")<br>
+ .flag("+march=mips32r2");<br>
+<br>
+ auto Mips16 = makeMultilib("/mips16").flag("+mips16");<br>
+<br>
+ auto UCLibc = makeMultilib("/uclibc").flag("+muclibc");<br>
+<br>
+ auto MAbi64 =<br>
+ makeMultilib("/64").flag("+mabi=n64").flag("-mabi=n32").flag("-m32");<br>
+<br>
+ auto BigEndian = makeMultilib("").flag("+EB").flag("-EL");<br>
+<br>
+ auto LittleEndian = makeMultilib("/el").flag("+EL").flag("-EB");<br>
+<br>
+ auto SoftFloat = makeMultilib("/sof").flag("+msoft-float");<br>
+<br>
+ auto Nan2008 = makeMultilib("/nan2008").flag("+mnan=2008");<br>
+<br>
+ FSFMipsMultilibs =<br>
+ MultilibSet()<br>
+ .Either(MArchMips32, MArchMicroMips, MArchMips64r2, MArchMips64,<br>
+ MArchDefault)<br>
+ .Maybe(UCLibc)<br>
+ .Maybe(Mips16)<br>
+ .FilterOut("/mips64/mips16")<br>
+ .FilterOut("/mips64r2/mips16")<br>
+ .FilterOut("/micromips/mips16")<br>
+ .Maybe(MAbi64)<br>
+ .FilterOut("/micromips/64")<br>
+ .FilterOut("/mips32/64")<br>
+ .FilterOut("^/64")<br>
+ .FilterOut("/mips16/64")<br>
+ .Either(BigEndian, LittleEndian)<br>
+ .Maybe(SoftFloat)<br>
+ .Maybe(Nan2008)<br>
+ .FilterOut(".*sof/nan2008")<br>
+ .FilterOut(NonExistent)<br>
+ .setIncludeDirsCallback([](StringRef InstallDir,<br>
+ StringRef TripleStr, const Multilib &M) {<br>
+ std::vector<std::string> Dirs;<br>
+ Dirs.push_back((InstallDir + "/include").str());<br>
+ std::string SysRootInc =<br>
+ InstallDir.str() + "/../../../../sysroot";<br>
+ if (StringRef(M.includeSuffix()).startswith("/uclibc"))<br>
+ Dirs.push_back(SysRootInc + "/uclibc/usr/include");<br>
+ else<br>
+ Dirs.push_back(SysRootInc + "/usr/include");<br>
+ return Dirs;<br>
+ });<br>
}<br>
<br>
// Check for Code Sourcery toolchain multilibs<br>
MultilibSet CSMipsMultilibs;<br>
{<br>
- auto MArchMips16 = makeMultilib("/mips16")<br>
- .flag("+m32").flag("+mips16");<br>
+ auto MArchMips16 = makeMultilib("/mips16").flag("+m32").flag("+mips16");<br>
<br>
- auto MArchMicroMips = makeMultilib("/micromips")<br>
- .flag("+m32").flag("+mmicromips");<br>
+ auto MArchMicroMips =<br>
+ makeMultilib("/micromips").flag("+m32").flag("+mmicromips");<br>
<br>
- auto MArchDefault = makeMultilib("")<br>
- .flag("-mips16").flag("-mmicromips");<br>
+ auto MArchDefault = makeMultilib("").flag("-mips16").flag("-mmicromips");<br>
<br>
- auto UCLibc = makeMultilib("/uclibc")<br>
- .flag("+muclibc");<br>
+ auto UCLibc = makeMultilib("/uclibc").flag("+muclibc");<br>
<br>
- auto SoftFloat = makeMultilib("/soft-float")<br>
- .flag("+msoft-float");<br>
+ auto SoftFloat = makeMultilib("/soft-float").flag("+msoft-float");<br>
<br>
- auto Nan2008 = makeMultilib("/nan2008")<br>
- .flag("+mnan=2008");<br>
+ auto Nan2008 = makeMultilib("/nan2008").flag("+mnan=2008");<br>
<br>
- auto DefaultFloat = makeMultilib("")<br>
- .flag("-msoft-float").flag("-mnan=2008");<br>
+ auto DefaultFloat =<br>
+ makeMultilib("").flag("-msoft-float").flag("-mnan=2008");<br>
<br>
- auto BigEndian = makeMultilib("")<br>
- .flag("+EB").flag("-EL");<br>
+ auto BigEndian = makeMultilib("").flag("+EB").flag("-EL");<br>
<br>
- auto LittleEndian = makeMultilib("/el")<br>
- .flag("+EL").flag("-EB");<br>
+ auto LittleEndian = makeMultilib("/el").flag("+EL").flag("-EB");<br>
<br>
// Note that this one's osSuffix is ""<br>
auto MAbi64 = makeMultilib("")<br>
- .gccSuffix("/64")<br>
- .includeSuffix("/64")<br>
- .flag("+mabi=n64").flag("-mabi=n32").flag("-m32");<br>
-<br>
- CSMipsMultilibs = MultilibSet()<br>
- .Either(MArchMips16, MArchMicroMips, MArchDefault)<br>
- .Maybe(UCLibc)<br>
- .Either(SoftFloat, Nan2008, DefaultFloat)<br>
- .FilterOut("/micromips/nan2008")<br>
- .FilterOut("/mips16/nan2008")<br>
- .Either(BigEndian, LittleEndian)<br>
- .Maybe(MAbi64)<br>
- .FilterOut("/mips16.*/64")<br>
- .FilterOut("/micromips.*/64")<br>
- .FilterOut(NonExistent)<br>
- .setIncludeDirsCallback([](<br>
- StringRef InstallDir, StringRef TripleStr, const Multilib &M) {<br>
- std::vector<std::string> Dirs;<br>
- Dirs.push_back((InstallDir + "/include").str());<br>
- std::string SysRootInc =<br>
- InstallDir.str() + "/../../../../" + TripleStr.str();<br>
- if (StringRef(M.includeSuffix()).startswith("/uclibc"))<br>
- Dirs.push_back(SysRootInc + "/libc/uclibc/usr/include");<br>
- else<br>
- Dirs.push_back(SysRootInc + "/libc/usr/include");<br>
- return Dirs;<br>
- });<br>
- }<br>
-<br>
- MultilibSet AndroidMipsMultilibs = MultilibSet()<br>
- .Maybe(Multilib("/mips-r2").flag("+march=mips32r2"))<br>
- .Maybe(Multilib("/mips-r6").flag("+march=mips32r6"))<br>
- .FilterOut(NonExistent);<br>
+ .gccSuffix("/64")<br>
+ .includeSuffix("/64")<br>
+ .flag("+mabi=n64")<br>
+ .flag("-mabi=n32")<br>
+ .flag("-m32");<br>
+<br>
+ CSMipsMultilibs =<br>
+ MultilibSet()<br>
+ .Either(MArchMips16, MArchMicroMips, MArchDefault)<br>
+ .Maybe(UCLibc)<br>
+ .Either(SoftFloat, Nan2008, DefaultFloat)<br>
+ .FilterOut("/micromips/nan2008")<br>
+ .FilterOut("/mips16/nan2008")<br>
+ .Either(BigEndian, LittleEndian)<br>
+ .Maybe(MAbi64)<br>
+ .FilterOut("/mips16.*/64")<br>
+ .FilterOut("/micromips.*/64")<br>
+ .FilterOut(NonExistent)<br>
+ .setIncludeDirsCallback([](StringRef InstallDir,<br>
+ StringRef TripleStr, const Multilib &M) {<br>
+ std::vector<std::string> Dirs;<br>
+ Dirs.push_back((InstallDir + "/include").str());<br>
+ std::string SysRootInc =<br>
+ InstallDir.str() + "/../../../../" + TripleStr.str();<br>
+ if (StringRef(M.includeSuffix()).startswith("/uclibc"))<br>
+ Dirs.push_back(SysRootInc + "/libc/uclibc/usr/include");<br>
+ else<br>
+ Dirs.push_back(SysRootInc + "/libc/usr/include");<br>
+ return Dirs;<br>
+ });<br>
+ }<br>
+<br>
+ MultilibSet AndroidMipsMultilibs =<br>
+ MultilibSet()<br>
+ .Maybe(Multilib("/mips-r2").flag("+march=mips32r2"))<br>
+ .Maybe(Multilib("/mips-r6").flag("+march=mips32r6"))<br>
+ .FilterOut(NonExistent);<br>
<br>
MultilibSet DebianMipsMultilibs;<br>
{<br>
- Multilib MAbiN32 = Multilib()<br>
- .gccSuffix("/n32")<br>
- .includeSuffix("/n32")<br>
- .flag("+mabi=n32");<br>
+ Multilib MAbiN32 =<br>
+ Multilib().gccSuffix("/n32").includeSuffix("/n32").flag("+mabi=n32");<br>
<br>
Multilib M64 = Multilib()<br>
- .gccSuffix("/64")<br>
- .includeSuffix("/64")<br>
- .flag("+m64").flag("-m32").flag("-mabi=n32");<br>
-<br>
- Multilib M32 = Multilib()<br>
- .flag("-m64").flag("+m32").flag("-mabi=n32");<br>
-<br>
- DebianMipsMultilibs = MultilibSet()<br>
- .Either(M32, M64, MAbiN32)<br>
- .FilterOut(NonExistent);<br>
+ .gccSuffix("/64")<br>
+ .includeSuffix("/64")<br>
+ .flag("+m64")<br>
+ .flag("-m32")<br>
+ .flag("-mabi=n32");<br>
+<br>
+ Multilib M32 = Multilib().flag("-m64").flag("+m32").flag("-mabi=n32");<br>
+<br>
+ DebianMipsMultilibs =<br>
+ MultilibSet().Either(M32, M64, MAbiN32).FilterOut(NonExistent);<br>
}<br>
<br>
MultilibSet ImgMultilibs;<br>
{<br>
- auto Mips64r6 = makeMultilib("/mips64r6")<br>
- .flag("+m64").flag("-m32");<br>
+ auto Mips64r6 = makeMultilib("/mips64r6").flag("+m64").flag("-m32");<br>
<br>
- auto LittleEndian = makeMultilib("/el")<br>
- .flag("+EL").flag("-EB");<br>
+ auto LittleEndian = makeMultilib("/el").flag("+EL").flag("-EB");<br>
<br>
- auto MAbi64 = makeMultilib("/64")<br>
- .flag("+mabi=n64").flag("-mabi=n32").flag("-m32");<br>
+ auto MAbi64 =<br>
+ makeMultilib("/64").flag("+mabi=n64").flag("-mabi=n32").flag("-m32");<br>
<br>
- ImgMultilibs = MultilibSet()<br>
- .Maybe(Mips64r6)<br>
- .Maybe(MAbi64)<br>
- .Maybe(LittleEndian)<br>
- .FilterOut(NonExistent)<br>
- .setIncludeDirsCallback([](<br>
- StringRef InstallDir, StringRef TripleStr, const Multilib &M) {<br>
- std::vector<std::string> Dirs;<br>
- Dirs.push_back((InstallDir + "/include").str());<br>
- Dirs.push_back((InstallDir + "/../../../../sysroot/usr/include").str());<br>
- return Dirs;<br>
- });<br>
+ ImgMultilibs =<br>
+ MultilibSet()<br>
+ .Maybe(Mips64r6)<br>
+ .Maybe(MAbi64)<br>
+ .Maybe(LittleEndian)<br>
+ .FilterOut(NonExistent)<br>
+ .setIncludeDirsCallback([](StringRef InstallDir,<br>
+ StringRef TripleStr, const Multilib &M) {<br>
+ std::vector<std::string> Dirs;<br>
+ Dirs.push_back((InstallDir + "/include").str());<br>
+ Dirs.push_back(<br>
+ (InstallDir + "/../../../../sysroot/usr/include").str());<br>
+ return Dirs;<br>
+ });<br>
}<br>
<br>
StringRef CPUName;<br>
@@ -1823,8 +1793,8 @@ static bool findMIPSMultilibs(const llvm<br>
<br>
// Sort candidates. Toolchain that best meets the directories goes first.<br>
// Then select the first toolchains matches command line flags.<br>
- MultilibSet *candidates[] = { &DebianMipsMultilibs, &FSFMipsMultilibs,<br>
- &CSMipsMultilibs };<br>
+ MultilibSet *candidates[] = {&DebianMipsMultilibs, &FSFMipsMultilibs,<br>
+ &CSMipsMultilibs};<br>
std::sort(<br>
std::begin(candidates), std::end(candidates),<br>
[](MultilibSet *a, MultilibSet *b) { return a->size() > b->size(); });<br>
@@ -1866,17 +1836,23 @@ static bool findBiarchMultilibs(const ll<br>
<br>
Multilib Default;<br>
Multilib Alt64 = Multilib()<br>
- .gccSuffix("/64")<br>
- .includeSuffix("/64")<br>
- .flag("-m32").flag("+m64").flag("-mx32");<br>
+ .gccSuffix("/64")<br>
+ .includeSuffix("/64")<br>
+ .flag("-m32")<br>
+ .flag("+m64")<br>
+ .flag("-mx32");<br>
Multilib Alt32 = Multilib()<br>
- .gccSuffix("/32")<br>
- .includeSuffix("/32")<br>
- .flag("+m32").flag("-m64").flag("-mx32");<br>
+ .gccSuffix("/32")<br>
+ .includeSuffix("/32")<br>
+ .flag("+m32")<br>
+ .flag("-m64")<br>
+ .flag("-mx32");<br>
Multilib Altx32 = Multilib()<br>
- .gccSuffix("/x32")<br>
- .includeSuffix("/x32")<br>
- .flag("-m32").flag("-m64").flag("+mx32");<br>
+ .gccSuffix("/x32")<br>
+ .includeSuffix("/x32")<br>
+ .flag("-m32")<br>
+ .flag("-m64")<br>
+ .flag("+mx32");<br>
<br>
FilterNonExistent NonExistent(Path);<br>
<br>
@@ -1923,8 +1899,7 @@ static bool findBiarchMultilibs(const ll<br>
if (!Result.Multilibs.select(Flags, Result.SelectedMultilib))<br>
return false;<br>
<br>
- if (Result.SelectedMultilib == Alt64 ||<br>
- Result.SelectedMultilib == Alt32 ||<br>
+ if (Result.SelectedMultilib == Alt64 || Result.SelectedMultilib == Alt32 ||<br>
Result.SelectedMultilib == Altx32)<br>
Result.BiarchSibling = Default;<br>
<br>
@@ -1940,27 +1915,26 @@ void Generic_GCC::GCCInstallationDetecto<br>
// check for. We also record what is necessary to walk from each back<br>
// up to the lib directory.<br>
const std::string LibSuffixes[] = {<br>
- "/gcc/" + CandidateTriple.str(),<br>
- // Debian puts cross-compilers in gcc-cross<br>
- "/gcc-cross/" + CandidateTriple.str(),<br>
- "/" + CandidateTriple.str() + "/gcc/" + CandidateTriple.str(),<br>
-<br>
- // The Freescale PPC SDK has the gcc libraries in<br>
- // <sysroot>/usr/lib/<triple>/x.y.z so have a look there as well.<br>
- "/" + CandidateTriple.str(),<br>
-<br>
- // Ubuntu has a strange mis-matched pair of triples that this happens to<br>
- // match.<br>
- // FIXME: It may be worthwhile to generalize this and look for a second<br>
- // triple.<br>
- "/i386-linux-gnu/gcc/" + CandidateTriple.str()<br>
- };<br>
+ "/gcc/" + CandidateTriple.str(),<br>
+ // Debian puts cross-compilers in gcc-cross<br>
+ "/gcc-cross/" + CandidateTriple.str(),<br>
+ "/" + CandidateTriple.str() + "/gcc/" + CandidateTriple.str(),<br>
+<br>
+ // The Freescale PPC SDK has the gcc libraries in<br>
+ // <sysroot>/usr/lib/<triple>/x.y.z so have a look there as well.<br>
+ "/" + CandidateTriple.str(),<br>
+<br>
+ // Ubuntu has a strange mis-matched pair of triples that this happens to<br>
+ // match.<br>
+ // FIXME: It may be worthwhile to generalize this and look for a second<br>
+ // triple.<br>
+ "/i386-linux-gnu/gcc/" + CandidateTriple.str()};<br>
const std::string InstallSuffixes[] = {<br>
- "/../../..", // gcc/<br>
- "/../../..", // gcc-cross/<br>
- "/../../../..", // <triple>/gcc/<br>
- "/../..", // <triple>/<br>
- "/../../../.." // i386-linux-gnu/gcc/<triple>/<br>
+ "/../../..", // gcc/<br>
+ "/../../..", // gcc-cross/<br>
+ "/../../../..", // <triple>/gcc/<br>
+ "/../..", // <triple>/<br>
+ "/../../../.." // i386-linux-gnu/gcc/<triple>/<br>
};<br>
// Only look at the final, weird Ubuntu suffix for i386-linux-gnu.<br>
const unsigned NumLibSuffixes =<br>
@@ -2007,16 +1981,15 @@ void Generic_GCC::GCCInstallationDetecto<br>
}<br>
}<br>
<br>
-Generic_GCC::Generic_GCC(const Driver &D, const llvm::Triple& Triple,<br>
+Generic_GCC::Generic_GCC(const Driver &D, const llvm::Triple &Triple,<br>
const ArgList &Args)<br>
- : ToolChain(D, Triple, Args), GCCInstallation() {<br>
+ : ToolChain(D, Triple, Args), GCCInstallation() {<br>
getProgramPaths().push_back(getDriver().getInstalledDir());<br>
if (getDriver().getInstalledDir() != getDriver().Dir)<br>
getProgramPaths().push_back(getDriver().Dir);<br>
}<br>
<br>
-Generic_GCC::~Generic_GCC() {<br>
-}<br>
+Generic_GCC::~Generic_GCC() {}<br>
<br>
Tool *Generic_GCC::getTool(Action::ActionClass AC) const {<br>
switch (AC) {<br>
@@ -2048,17 +2021,11 @@ bool Generic_GCC::IsUnwindTablesDefault(<br>
return getArch() == llvm::Triple::x86_64;<br>
}<br>
<br>
-bool Generic_GCC::isPICDefault() const {<br>
- return false;<br>
-}<br>
+bool Generic_GCC::isPICDefault() const { return false; }<br>
<br>
-bool Generic_GCC::isPIEDefault() const {<br>
- return false;<br>
-}<br>
+bool Generic_GCC::isPIEDefault() const { return false; }<br>
<br>
-bool Generic_GCC::isPICDefaultForced() const {<br>
- return false;<br>
-}<br>
+bool Generic_GCC::isPICDefaultForced() const { return false; }<br>
<br>
bool Generic_GCC::IsIntegratedAssemblerDefault() const {<br>
switch (getTriple().getArch()) {<br>
@@ -2097,8 +2064,7 @@ void Generic_ELF::addClangTargetOptions(<br>
getTriple().getOS() == llvm::Triple::NaCl;<br>
<br>
if (DriverArgs.hasFlag(options::OPT_fuse_init_array,<br>
- options::OPT_fno_use_init_array,<br>
- UseInitArrayDefault))<br>
+ options::OPT_fno_use_init_array, UseInitArrayDefault))<br>
CC1Args.push_back("-fuse-init-array");<br>
}<br>
<br>
@@ -2124,18 +2090,15 @@ std::string Hexagon_TC::GetGnuDir(const<br>
return InstallRelDir;<br>
}<br>
<br>
-const char *Hexagon_TC::GetSmallDataThreshold(const ArgList &Args)<br>
-{<br>
+const char *Hexagon_TC::GetSmallDataThreshold(const ArgList &Args) {<br>
Arg *A;<br>
<br>
- A = Args.getLastArg(options::OPT_G,<br>
- options::OPT_G_EQ,<br>
+ A = Args.getLastArg(options::OPT_G, options::OPT_G_EQ,<br>
options::OPT_msmall_data_threshold_EQ);<br>
if (A)<br>
return A->getValue();<br>
<br>
- A = Args.getLastArg(options::OPT_shared,<br>
- options::OPT_fpic,<br>
+ A = Args.getLastArg(options::OPT_shared, options::OPT_fpic,<br>
options::OPT_fPIC);<br>
if (A)<br>
return "0";<br>
@@ -2143,18 +2106,14 @@ const char *Hexagon_TC::GetSmallDataThre<br>
return 0;<br>
}<br>
<br>
-bool Hexagon_TC::UsesG0(const char* smallDataThreshold)<br>
-{<br>
+bool Hexagon_TC::UsesG0(const char *smallDataThreshold) {<br>
return smallDataThreshold && smallDataThreshold[0] == '0';<br>
}<br>
<br>
-static void GetHexagonLibraryPaths(<br>
- const ArgList &Args,<br>
- const std::string &Ver,<br>
- const std::string &MarchString,<br>
- const std::string &InstalledDir,<br>
- ToolChain::path_list *LibPaths)<br>
-{<br>
+static void GetHexagonLibraryPaths(const ArgList &Args, const std::string &Ver,<br>
+ const std::string &MarchString,<br>
+ const std::string &InstalledDir,<br>
+ ToolChain::path_list *LibPaths) {<br>
bool build</blockquote></div></div></blockquote></div></div></div>...<br><br>[Message clipped] <br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>