summaryrefslogtreecommitdiffstats
path: root/clang/Driver
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[RISCV] Mark unit tests as "requires: riscv-registered-target""Mandeep Singh Grang2018-11-276-686/+0
| | | | | | This reverts commit 1a6a0c9ea2716378d55858c11adf5941608531f8. llvm-svn: 347689
* [RISCV] Mark unit tests as "requires: riscv-registered-target"Mandeep Singh Grang2018-11-276-0/+686
| | | | | | | | | | | | | | Summary: Some of these tests break if the RISCV backend has not been built. Reviewers: asb, apazos, sabuasal Reviewed By: sabuasal Subscribers: rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, cfe-commits Differential Revision: https://reviews.llvm.org/D54816 llvm-svn: 347688
* Move <root>/Driver into <root>/tools/clang-cc.Daniel Dunbar2009-03-2421-13476/+0
| | | | | | Again, I tried to update cmake but it is untested. llvm-svn: 67605
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* if the driver decides to run clang on a .s file, treat it as a .S file.Chris Lattner2009-03-231-1/+3
| | | | llvm-svn: 67532
* PTHManager::Create():Ted Kremenek2009-03-221-2/+7
| | | | | | | | | | | - Make the Diagnostic::Level for PTH errors to be specified by the caller clang (driver): - Set the PTHManager diagnostic level to "Diagnostic::Error" for -include-pth (a hard error) and Diagnostic::Warning for -token-cache (we can still proceed). llvm-svn: 67462
* Frontend: Handle empty input on stdin.Daniel Dunbar2009-03-211-1/+9
| | | | | | | | | | - PR3854. I think it makes more sense to change MemoryBuffer::getSTDIN (return 0 should indicate error, not empty), but it is documented to return 0 for empty inputs, and some other code appears to rely on this. llvm-svn: 67449
* ccc/Driver/clang-fe: Accept -fbuiltin, and forward -f[no-]builtin to clang.Daniel Dunbar2009-03-201-3/+4
| | | | llvm-svn: 67420
* InitListDesignations hasn't been used (ever). Eliminate it, andDouglas Gregor2009-03-201-1/+0
| | | | | | | simplify the parsing and action interface for designated initializers. llvm-svn: 67415
* fix test/Preprocessor/macro_paste_mscomment.c.Chris Lattner2009-03-202-2/+2
| | | | llvm-svn: 67403
* add a new LangOptions::GNUMode bit to distinguish between GNU99 and C99 etc.Chris Lattner2009-03-201-4/+7
| | | | llvm-svn: 67374
* Preserve ordering between -include and -include-pth.Ted Kremenek2009-03-201-1/+2
| | | | llvm-svn: 67354
* Implement "-include-pth" in low-level driver. This allows a PTH file to be usedTed Kremenek2009-03-201-4/+42
| | | | | | | | | similar to a regular file passed to "-include". When -include-pth is used, the low-level driver queries the PTH file for the name of the original source file that generated the PTH file and implicitly adds a '#include' for that file in the Predefines buffer. llvm-svn: 67352
* Store the name of the original file used to generate the PTH file in the PTHTed Kremenek2009-03-191-5/+29
| | | | | | file itself. llvm-svn: 67340
* Per Daniel's suggestion, remove default case from switch statement to makeTed Kremenek2009-03-191-1/+1
| | | | | | uncaught language cases a compile warning instead of a runtime error. llvm-svn: 67325
* Allow notes to be printed following a fatal error, then suppress anyDouglas Gregor2009-03-191-0/+2
| | | | | | | | | | diagnostics following those notes. Make exceeding the template instantiation depth a fatal error. Thanks to Daniel for pointing out the problem! llvm-svn: 67320
* Support langkind_cxx_pch when determining the language dialect.Ted Kremenek2009-03-191-0/+1
| | | | llvm-svn: 67315
* Build system changes to use TableGen to generate the variousDouglas Gregor2009-03-161-1/+1
| | | | | | | | | | | | | | | | | | diagnostics. This builds on the patch that Sebastian committed and then revert. Major differences are: - We don't remove or use the current ".def" files. Instead, for now, we just make sure that we're building the ".inc" files. - Fixed CMake makefiles to run TableGen and build the ".inc" files when needed. Tested with both the Xcode and Makefile generators provided by CMake, so it should be solid. - Fixed normal makefiles to handle out-of-source builds that involve the ".inc" files. I'll send a separate patch to the list with Sebastian's changes that eliminate the use of the .def files. llvm-svn: 67058
* simplify this code by reading the decision from LangOptions instead Chris Lattner2009-03-161-3/+4
| | | | | | of recomputing the property from command line options. llvm-svn: 67047
* Handle static_asserts when instantiating structs.Anders Carlsson2009-03-151-2/+1
| | | | llvm-svn: 67031
* Convert a bunch of actions to smart pointers, and also bring ↵Sebastian Redl2009-03-151-32/+209
| | | | | | PrintParserCallbacks a bit more in line with reality. llvm-svn: 67029
* Don't accept '$' in identifiers in assembler-with-cpp mode.Daniel Dunbar2009-03-151-1/+3
| | | | llvm-svn: 67013
* Don't run simplify lib calls with -ffreestanding (fix for alreadyDaniel Dunbar2009-03-141-1/+1
| | | | | | failing test case). llvm-svn: 66991
* wire up a new -fno-builtin option, make it control things like simplifylibcalls,Chris Lattner2009-03-131-2/+10
| | | | | | etc and make freestanding imply it. llvm-svn: 66972
* Implement template instantiation for several more kinds of expressions:Douglas Gregor2009-03-131-2/+2
| | | | | | | | | | | | - C++ function casts, e.g., T(foo) - sizeof(), alignof() More importantly, this allows us to verify that we're performing overload resolution during template instantiation, with argument-dependent lookup and the "cached" results of name lookup from the template definition. llvm-svn: 66947
* introduce a new -fheinous-gnu-extensions flag that enables reallyChris Lattner2009-03-131-0/+7
| | | | | | | | | | | really horrible extensions that are disabled by default but that can be accepted by -fheinous-gnu-extensions (but which always emit a warning when enabled). As our first instance of this, implement PR3788/PR3794, which allows non-lvalues in inline asms in contexts where lvalues are required. bleh. llvm-svn: 66910
* implement a new -fprint-source-range-info option, whichChris Lattner2009-03-131-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defaults to off. When enabled, it emits range info along with the file/line/col information for a diagnostic. This allows tools that textually parse the output of clang to know where the ranges are, even if they span multiple lines. For example, with: $ clang exprs.c -fprint-source-range-info We now produce: exprs.c:21:11:{21:12-21:13}: warning: use of unary operator that may be intended as compound assignment (+=) var =+ 5; // expected-warning {{use of unary operator that may be intended as compound assignment (+=)}} ^~ exprs.c:22:11:{22:12-22:13}: warning: use of unary operator that may be intended as compound assignment (-=) var =- 5; // expected-warning {{use of unary operator that may be intended as compound assignment (-=)}} ^~ exprs.c:36:13:{36:3-36:12}: error: assignment to cast is illegal, lvalue casts are not supported (float*)X = P; // expected-error {{assignment to cast is illegal, lvalue casts are not supported}} ~~~~~~~~~ ^ exprs.c:41:4:{41:3-41:4}: error: called object type 'int' is not a function or function pointer X(); // expected-error {{called object type 'int' is not a function or function pointer}} ~^ exprs.c:45:15:{45:8-45:14}{45:17-45:24}: error: invalid operands to binary expression ('int *' and '_Complex float') P = (P-42) + Gamma*4; // expected-error {{invalid operands to binary expression ('int *' and '_Complex float')}} ~~~~~~ ^ ~~~~~~~ exprs.c:61:7:{61:16-61:22}: error: invalid application of '__alignof' to bitfield R = __alignof(P->x); // expected-error {{invalid application of '__alignof' to bitfield}} expected-warning {{extension used}} ^ ~~~~~~ Note the range info after the column in the initial diagnostic. This is obviously really annoying if you're not a tool parsing the output of clang, which is why it is off by default. llvm-svn: 66862
* API fix: All "bodies" for functions, Objective-C methods, blocks, are assumed toTed Kremenek2009-03-122-6/+10
| | | | | | | | be CompoundStmts. I think this is a valid assumption, and felt that the API should reflect it. Others please validate this assumption to make sure I didn't break anything. llvm-svn: 66814
* Add Diagnostic files for Frontend and move a couple errors over.Daniel Dunbar2009-03-121-6/+8
| | | | | | | - Notably, clang now exits with an error if it can't find a file. This flushed out a bug in the CGColorSpace.c test case. :) llvm-svn: 66789
* gnu++0x is definitely *not* the defaultGabor Greif2009-03-111-1/+1
| | | | llvm-svn: 66736
* Eliminate CXXClassVarDecl. It doesn't add anythingDouglas Gregor2009-03-111-5/+0
| | | | llvm-svn: 66696
* Display the exploded graph before calling BugReporter.FlushReports(). The latterTed Kremenek2009-03-111-4/+4
| | | | | | | deletes all registered BugTypes from BugReporter, and thus we need to display the graph first. llvm-svn: 66623
* Limit the template instantiation depth to some user-configurable valueDouglas Gregor2009-03-101-1/+6
| | | | | | | | | | | | | | | | (default: 99). Beyond this limit, produce an error and consider the current template instantiation a failure. The stack we're building to track the instantiations will, eventually, be used to produce instantiation backtraces from diagnostics within template instantiation. However, we're not quite there yet. This adds a new Clang driver option -ftemplate-depth=NNN, which should eventually be generated from the GCC command-line operation -ftemplate-depth-NNN (note the '-' rather than the '='!). I did not make the driver changes to do this mapping. llvm-svn: 66513
* move -g option down into rest of codegen sectionChris Lattner2009-03-091-9/+7
| | | | llvm-svn: 66480
* move debug info generation flag into CompileOptions.Chris Lattner2009-03-093-12/+8
| | | | llvm-svn: 66478
* implement -Wsystem-headers, eliminating the wierd thing I added for testing.Chris Lattner2009-03-091-4/+3
| | | | llvm-svn: 66447
* Fix warnings in build on clang-x86_64-freebsd buildbot.Mike Stump2009-03-071-2/+3
| | | | llvm-svn: 66344
* Improve error messages on bad warning options.Sebastian Redl2009-03-072-9/+10
| | | | llvm-svn: 66334
* Implement the machinery that can process TableGenerated warning options.Sebastian Redl2009-03-064-96/+227
| | | | | | Manually write a table and some ad-hoc code to provide feature parity with the current code. llvm-svn: 66276
* capitalize for consistency, a crash in regalloc now looks like this:Chris Lattner2009-03-061-4/+4
| | | | | | | | | | | Stack dump: 0. Program arguments: clang pr3399.c -S -O3 1. <eof> parser at end of file 2. Code generation 3. Running pass 'Linear Scan Register Allocator' on function '@foo' Abort llvm-svn: 66261
* To the user, this is just a compiler of course, duh.Chris Lattner2009-03-061-1/+1
| | | | llvm-svn: 66251
* clean up the OVERVIEW line in clang --help.Chris Lattner2009-03-061-1/+2
| | | | llvm-svn: 66250
* rename PrettyStackTraceDecl -> PrettyStackTraceActionsDecl.Chris Lattner2009-03-051-11/+26
| | | | | | | | | | | | | | | | Introduce a new PrettyStackTraceDecl. Use it to add the top level LLVM IR generation stuff in Backend.cpp to stack traces. We now get crashes like: Stack dump: 0. Program arguments: clang t.c -emit-llvm 1. <eof> parser at end of file 2. t.c:1:5: LLVM IR generation of declaration 'a' Abort for IR generation crashes. llvm-svn: 66153
* Implemented access check for ivars accessed insideFariborz Jahanian2009-03-041-1/+2
| | | | | | c-style functions declared inside objc @implementations. llvm-svn: 66087
* Start making use of "pretty stack dumps" to get Chris Lattner2009-03-041-0/+2
| | | | | | better crash info when clang crashes. Step #2 of many. llvm-svn: 66078
* minor cleanupsChris Lattner2009-03-041-52/+47
| | | | llvm-svn: 66077
* Change Parser::ParseCaseStatement to use an iterative approach to parsingChris Lattner2009-03-041-2/+1
| | | | | | | | | | | | | | | | | | multiple sequential case statements instead of doing it with recursion. This fixes a problem where we run out of stack space parsing 100K directly nested cases. There are a couple other problems that prevent this from being useful in practice (right now the example only parses correctly with -disable-free and doesn't work with -emit-llvm), but this is a start. I'm not including a testcase because it is large and uninteresting for regtesting. Sebastian, I would appreciate it if you could scrutinize the smart pointer gymnastics I do. llvm-svn: 66011
* implement support for propagating *features* down to the code generatorChris Lattner2009-03-031-16/+18
| | | | | | | | | | | and defining target-specific macros based on them (like __SSE3__ and friends). After extensive discussion with Daniel, this work will need driver support, which will translate things like -msse3 into a -mattr feature. Until this work is done, the code in clang.cpp is disabled and the X86TargetInfo ctor still defaults to SSE2. With these two things changed, this code will work. PR3634 llvm-svn: 65966
* Fix <rdar://problem/6640991> Exception handling executes wrong clause ↵Steve Naroff2009-03-032-5/+5
| | | | | | | | | | | (Daniel, please verify). Also necessary to fix: <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements llvm-svn: 65964
* start wiring up support for target-specific -mfoo options like -msseChris Lattner2009-03-021-0/+23
| | | | llvm-svn: 65881
OpenPOWER on IntegriCloud