Deleted Added
sdiff udiff text old ( 264464 ) new ( 266715 )
full compact
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
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.
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 }
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 ---