Deleted Added
full compact
Tools.cpp (264464) Tools.cpp (266715)
1//===--- Tools.cpp - Tools Implementations --------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 1982 unchanged lines hidden (view full) ---

1991
1992 // First extract the dwo sections.
1993 C.addCommand(new Command(JA, T, Exec, ExtractArgs));
1994
1995 // Then remove them from the original .o file.
1996 C.addCommand(new Command(JA, T, Exec, StripArgs));
1997}
1998
1//===--- Tools.cpp - Tools Implementations --------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 1982 unchanged lines hidden (view full) ---

1991
1992 // First extract the dwo sections.
1993 C.addCommand(new Command(JA, T, Exec, ExtractArgs));
1994
1995 // Then remove them from the original .o file.
1996 C.addCommand(new Command(JA, T, Exec, StripArgs));
1997}
1998
1999static bool isOptimizationLevelFast(const ArgList &Args) {
2000 if (Arg *A = Args.getLastArg(options::OPT_O_Group))
2001 if (A->getOption().matches(options::OPT_Ofast))
2002 return true;
2003 return false;
2004}
2005
2006/// \brief Vectorize at all optimization levels greater than 1 except for -Oz.
2007static bool shouldEnableVectorizerAtOLevel(const ArgList &Args) {
2008 if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
2009 if (A->getOption().matches(options::OPT_O4) ||
2010 A->getOption().matches(options::OPT_Ofast))
2011 return true;
2012
2013 if (A->getOption().matches(options::OPT_O0))

--- 2595 unchanged lines hidden (view full) ---

4609 const Action *SourceAction = &JA;
4610 while (SourceAction->getKind() != Action::InputClass) {
4611 assert(!SourceAction->getInputs().empty() && "unexpected root action!");
4612 SourceAction = SourceAction->getInputs()[0];
4613 }
4614
4615 // If -no_integrated_as is used add -Q to the darwin assember driver to make
4616 // sure it runs its system assembler not clang's integrated assembler.
1999/// \brief Vectorize at all optimization levels greater than 1 except for -Oz.
2000static bool shouldEnableVectorizerAtOLevel(const ArgList &Args) {
2001 if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
2002 if (A->getOption().matches(options::OPT_O4) ||
2003 A->getOption().matches(options::OPT_Ofast))
2004 return true;
2005
2006 if (A->getOption().matches(options::OPT_O0))

--- 2595 unchanged lines hidden (view full) ---

4602 const Action *SourceAction = &JA;
4603 while (SourceAction->getKind() != Action::InputClass) {
4604 assert(!SourceAction->getInputs().empty() && "unexpected root action!");
4605 SourceAction = SourceAction->getInputs()[0];
4606 }
4607
4608 // If -no_integrated_as is used add -Q to the darwin assember driver to make
4609 // sure it runs its system assembler not clang's integrated assembler.
4617 if (Args.hasArg(options::OPT_no_integrated_as))
4618 CmdArgs.push_back("-Q");
4610 // Applicable to darwin11+ and Xcode 4+. darwin<10 lacked integrated-as.
4611 // FIXME: at run-time detect assembler capabilities or rely on version
4612 // information forwarded by -target-assembler-version (future)
4613 if (Args.hasArg(options::OPT_no_integrated_as)) {
4614 const llvm::Triple& t(getToolChain().getTriple());
4615 if (!(t.isMacOSX() && t.isMacOSXVersionLT(10, 7)))
4616 CmdArgs.push_back("-Q");
4617 }
4619
4620 // Forward -g, assuming we are dealing with an actual assembly file.
4621 if (SourceAction->getType() == types::TY_Asm ||
4622 SourceAction->getType() == types::TY_PP_Asm) {
4623 if (Args.hasArg(options::OPT_gstabs))
4624 CmdArgs.push_back("--gstabs");
4625 else if (Args.hasArg(options::OPT_g_Group))
4626 CmdArgs.push_back("-g");

--- 2548 unchanged lines hidden ---
4618
4619 // Forward -g, assuming we are dealing with an actual assembly file.
4620 if (SourceAction->getType() == types::TY_Asm ||
4621 SourceAction->getType() == types::TY_PP_Asm) {
4622 if (Args.hasArg(options::OPT_gstabs))
4623 CmdArgs.push_back("--gstabs");
4624 else if (Args.hasArg(options::OPT_g_Group))
4625 CmdArgs.push_back("-g");

--- 2548 unchanged lines hidden ---