aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Compilation.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-11-15Use empty parens for empty function parameter list instead of '(void)'.Dmitri Gribenko1-2/+2
llvm-svn: 168041
2012-10-31[driver] Remove an extra space with the -iprefix option, so thatChad Rosier1-1/+1
matching works correctly. Part of rdar://12329974 llvm-svn: 167173
2012-10-31[driver] Remove an extra space with the -internal-externc-isystem option, soChad Rosier1-1/+1
that matching works correctly. Part of rdar://12329974 llvm-svn: 167161
2012-10-31[driver] Completely rework how superfluous options are stripped out of the crashChad Rosier1-0/+100
diagnostics script. This addresses the FIXME pertaining to quoted arguments. We also delineate between those flags that have an argument (e.g., -D macro, -MF file) and those that do not (e.g., -M, -MM, -MG). Finally, we add the -dwarf-debug-flags to the list of flags to be removed. rdar://12329974 llvm-svn: 167152
2012-05-03Use array_lengthof instead of sizeof trickery.Chad Rosier1-2/+1
llvm-svn: 156104
2012-05-03Canonicalize loop.Chad Rosier1-1/+2
llvm-svn: 156093
2012-04-16use DEFAULT_SYSROOTSebastian Pop1-0/+4
llvm-svn: 154792
2011-11-06Add the depfile as a result file so that it is deleted if we crash,Peter Collingbourne1-2/+6
and prevent the diagnostic preprocessor run from writing a depfile. llvm-svn: 143846
2011-10-06Use strpbrk(3) instead of open coding it.Benjamin Kramer1-8/+1
llvm-svn: 141328
2011-10-05[driver] For consistency, handle all shell special characters handled by theChad Rosier1-1/+1
quoting code. llvm-svn: 141205
2011-10-05[driver] The -v option doesn't quoted the command line arguments for historicalChad Rosier1-1/+8
reasons. However, it does seems practical to quote strings that need it. rdar://10221951 llvm-svn: 141202
2011-08-02When the compiler crashes, the compiler driver now produces diagnostic Chad Rosier1-4/+33
information including the fully preprocessed source file(s) and command line arguments. The developer is asked to attach this diagnostic information to a bug report. rdar://9575623 llvm-svn: 136702
2011-07-23Unbreak the MSVC build, using namespace clang is required otherwise MSVC ↵Francois Pichet1-0/+2
will not find raw_ostream. llvm-svn: 135853
2011-07-23remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner1-2/+2
LLVM.h imports them into the clang namespace. llvm-svn: 135852
2011-07-20Temporarily revert r135614 while I fix the cmake build.Chad Rosier1-35/+4
llvm-svn: 135621
2011-07-20When the compiler crashes, the compiler driver now produces diagnostic ↵Chad Rosier1-4/+35
information including the fully preprocessed source file(s) and command line arguments. The developer is asked to attach this diagnostic information to a bug report. llvm-svn: 135614
2011-07-06Missing header from last commit; accidental change.John McCall1-1/+0
llvm-svn: 134455
2011-07-06Change the driver's logic about Objective-C runtimes: abstract out aJohn McCall1-0/+1
structure to hold inferred information, then propagate each invididual bit down to -cc1. Separate the bits of "supports weak" and "has a native ARC runtime"; make the latter a CodeGenOption. The tool chain is still driving this decision, because it's the place that has the required deployment target information on Darwin, but at least it's better-factored now. llvm-svn: 134453
2011-04-25Driver: When compilation fails, don't try to remove output files we don't haveDaniel Dunbar1-0/+6
write access to. llvm-svn: 130150
2010-12-31Remove stray emacs mode markers in all these files that was causing emacs toNick Lewycky1-1/+1
open them in fundamental-mode instead of c++-mode. Also twiddle whitespace for consistency in ToolChains.cpp. llvm-svn: 122646
2010-11-29Merge System into Support.Michael J. Spencer1-1/+1
llvm-svn: 120297
2010-10-30Use the expanded form of S_ISREG. Hopefully this unbreaks the MSVC build.Benjamin Kramer1-1/+1
llvm-svn: 117779
2010-10-29Don't test isRegularFile before calling eraseFromDisk, sinceDan Gohman1-11/+5
eraseFromDisk does the same check. This avoids a stat call in the common case. llvm-svn: 117744
2010-08-02Driver: Eliminate PipedJob, which is now unused.Daniel Dunbar1-12/+0
llvm-svn: 110014
2010-06-11Driver: Add an explicit argument translation phase to the driver itself. We ↵Daniel Dunbar1-7/+12
are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect. llvm-svn: 105842
2010-03-20Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in ↵Daniel Dunbar1-2/+28
-v style) to a file. llvm-svn: 99054
2010-03-20Driver: Fix -### to quote shell special characters, following gcc.Daniel Dunbar1-4/+15
llvm-svn: 99053
2009-11-25Fix for Path::isSpecialFile to Path::isRegularFile API in rev 89765.Edward O'Callaghan1-1/+1
llvm-svn: 89849
2009-11-24Fix for PR5568.Edward O'Callaghan1-0/+7
llvm-svn: 89766
2009-11-19Driver: ArgList doesn't depend on Options.h anymore.Daniel Dunbar1-0/+1
llvm-svn: 89313
2009-09-09Push bound architecture name into TranslateArgs.Daniel Dunbar1-1/+1
llvm-svn: 81366
2009-09-09Push bound architecture name into Compilation::getArgsForToolChain.Daniel Dunbar1-4/+6
llvm-svn: 81365
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump1-18/+18
llvm-svn: 81346
2009-07-01Driver: Mark some Compilation members const.Daniel Dunbar1-2/+2
llvm-svn: 74636
2009-07-01Driver: Move Compilation::Execute to Driver::ExecuteCompilation.Daniel Dunbar1-48/+0
- The Compilation is just a helper class, it shouldn't have that amount of logic in it. - No functionality change. llvm-svn: 74634
2009-07-01Driver: Improve diagnostics for failed commands.Daniel Dunbar1-6/+37
- Not all tools give good error messages, and sometimes the tool can fail w/o any error (for example, when signalled). - We suppress this message when the failing command is the compiler and it failed normally (exit code == 1), under the assumption that it gave a good diagnostic. For example, for a linker failure we now get: -- ddunbar@lordcrumb:tmp$ clang a.c b.c ld: duplicate symbol _x in /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-bXYITq.o and /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-6uK4jD.o clang: error: linker command failed with exit code 1 (use -v to see invocation) -- For a compiler crash we get: -- ddunbar@lordcrumb:tmp$ clang t.i Assertion failed: (CGT.getTargetData().getTypeAllocSizeInBits(STy) == RL.getSize()), function layoutStructFields, file CodeGenTypes.cpp, line 573. 0 clang-cc 0x0000000100f1f1f1 PrintStackTrace(void*) + 38 ... stack trace and virtual stack trace follow ... clang: error: compiler command failed due to signal 6 (use -v to see invocation) -- But for a regular compilation failure we get the usual: -- ddunbar@lordcrumb:tmp$ clang c.c c.c:1:6: error: invalid token after top level declarator int x ^ 1 diagnostic generated. -- - No test case, not amenable to non-executable testing. :/ - <rdar://problem/6945613> llvm-svn: 74629
2009-03-25Driver: Prep for tool chain specific argument translation.Daniel Dunbar1-9/+6
- Lift ArgList to a base class for InputArgList and DerivedArgList. - This is not a great decomposition, but it does embed the translation into the type system, and keep things efficient for tool chains that don't want to do any translation. - No intended functionality change. Eventually I hope to get rid of tool chain specific translation and have each tool do the right thing, but for now this is the easiest way to match gcc precisely (which is good for testing). llvm-svn: 67676
2009-03-24Driver: Result files shouldn't be removed on failure when -save-tempsDaniel Dunbar1-1/+1
is specified. - No easy way to make a safe test case for this (given where the driver is supposed to put temp files). llvm-svn: 67632
2009-03-21Driver: Give Compilation::Execute total control over the Driver resultDaniel Dunbar1-0/+4
code; and don't return an error code when -### is present, even if errors occur. llvm-svn: 67425
2009-03-19Driver: Compilation::Execute wasn't returning result code correctly.Daniel Dunbar1-1/+1
llvm-svn: 67296
2009-03-19Driver: Executing piped jobs with a single command is easy.Daniel Dunbar1-23/+30
llvm-svn: 67295
2009-03-18Driver: Execute jobs; no pipe support yet.Daniel Dunbar1-14/+56
llvm-svn: 67250
2009-03-18Driver: Cleanup temporary/result files.Daniel Dunbar1-2/+46
llvm-svn: 67248
2009-03-18Driver: Implement -### (hard to tell, since we don't actuallyDaniel Dunbar1-0/+27
construct any jobs). llvm-svn: 67177
2009-03-18Driver: Fix Compilation::getArgsForToolChain, local variable wasDaniel Dunbar1-4/+4
shadowing member. llvm-svn: 67167
2009-03-18Driver: Move actions into Compilation, and construct the compilationDaniel Dunbar1-0/+6
earlier. - This gives us a simple ownership model, and allows clients access to more information should they ever want it. - We now free Actions correctly. llvm-svn: 67158
2009-03-16Driver: Migrate some data into the Compilation; after pipeliningDaniel Dunbar1-2/+28
access to most data should go through the current Compilation, not the Driver (which shouldn't be specialized on variables for a single compilation). llvm-svn: 67037
2009-03-04Driver: Sink Driver/Compilation into clang::driver namespace.Daniel Dunbar1-1/+1
- Add OptTable instance to Driver. llvm-svn: 66063
2009-03-02Stub out some structure for C++ driver.Daniel Dunbar1-0/+21
llvm-svn: 65867