summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Frontend: Lift InputKind enumeration to top level.Daniel Dunbar2010-06-071-1/+1
| | | | llvm-svn: 105577
* MemoryBuffer::getSTDIN may return a null pointer if an error occurs.Dan Gohman2010-05-271-1/+1
| | | | llvm-svn: 104856
* Only enable code patterns (e.g., try { statements } catch (...) {Douglas Gregor2010-05-251-2/+4
| | | | | | statements }) in the code-completion results if explicitly requested. llvm-svn: 104637
* Once we've emitted a fatal diagnostic, keep counting errors but with aDouglas Gregor2010-04-141-1/+2
| | | | | | | | | | | | | | separate count of "suppressed" errors. This way, semantic analysis bits that depend on the error count to determine whether problems occured (e.g., some template argument deduction failures, jump-scope checking) will not get confused. The actual problem here is that a missing #include (which is a fatal error) could cause the jump-scope checker to run on invalid code, which it is not prepared to do. Trivial fix for both <rdar://problem/7775941> and <rdar://problem/7775709>. llvm-svn: 101297
* Instead of counting totally diagnostics, split the count into a countChris Lattner2010-04-071-5/+13
| | | | | | | | | | | | | | | of errors and warnings. This allows us to emit something like this: 2 warnings and 1 error generated. instead of: 3 diagnostics generated. This also stops counting 'notes' because they are just follow-on information about the previous diag, not a diagnostic in themselves. llvm-svn: 100675
* Make Diagnostic reference-counted, which is simpler than jugglingDouglas Gregor2010-04-051-7/+8
| | | | | | maybe-ownership vs. ownership. llvm-svn: 100498
* Teach Clang's -cc1 option -print-stats to print LLVM statistics.Douglas Gregor2010-03-301-0/+4
| | | | llvm-svn: 99894
* clang -cc1: Kill off -empty-input only, and replace with -init-only which is anDaniel Dunbar2010-03-191-6/+1
| | | | | | | | actual action. - This is easier to use, and more reliable for timing the thing this was actually meant to be useful for. llvm-svn: 98978
* Optionally store a PreprocessingRecord in the preprocessor itself, andDouglas Gregor2010-03-191-0/+3
| | | | | | tie its creation to a CC1 flag -detailed-preprocessing-record. llvm-svn: 98963
* Simplify error path using OwningPtrKovarththanan Rajaratnam2010-03-171-4/+3
| | | | llvm-svn: 98722
* Simplify ProcessWarningOptions since it can't failKovarththanan Rajaratnam2010-03-171-2/+1
| | | | llvm-svn: 98721
* Issue a proper diagnostic if we couldn't open dump fileKovarththanan Rajaratnam2010-03-171-7/+6
| | | | llvm-svn: 98719
* Don't consume tokens past the end-of-file in an @interface. FixesDouglas Gregor2010-03-161-0/+2
| | | | | | <rdar://problem/7735566>. llvm-svn: 98613
* Give SourceManager a Diagnostic object with which to report errors,Douglas Gregor2010-03-161-1/+1
| | | | | | and start simplifying the interfaces in SourceManager that can fail. llvm-svn: 98594
* Lowercase for consistencyKovarththanan Rajaratnam2010-03-061-2/+2
| | | | llvm-svn: 97878
* Rework how CIndex handles diagnostics. Rather than using a callback,Douglas Gregor2010-02-181-1/+1
| | | | | | | | | | | | | | | | | | we attach diagnostics to translation units and code-completion results, so they can be queried at any time. To facilitate this, the new StoredDiagnostic class stores a diagnostic in a serializable/deserializable form, and ASTUnit knows how to capture diagnostics in this stored form. CIndex's CXDiagnostic is a thin wrapper around StoredDiagnostic, providing a C interface to stored or de-serialized diagnostics. I've XFAIL'd one test case temporarily, because currently we end up storing diagnostics in an ASTUnit that's never returned to the user (because it contains errors). I'll introduce a temporary fix for this soon; the real fix will be to allow us to return and query invalid ASTs. llvm-svn: 96592
* CompilerInstance: Move LLVMContext member out of constructor.Daniel Dunbar2010-02-161-7/+6
| | | | llvm-svn: 96314
* CompilerInstance: Change to not contain the CompilerInvocation object.Daniel Dunbar2010-01-301-2/+7
| | | | | | | | This allows clients to install their own CompilerInvocation object, which is important for clients that may wish to create references to things like LangOptions whose lifetime will extend past that of the CompilerInstance. llvm-svn: 94923
* Introduce serialization and deserialization of diagnostic informationDouglas Gregor2010-01-281-2/+34
| | | | | | | | | | | | | | | | | so that CIndex can report diagnostics through the normal mechanisms even when executing Clang in a separate process. This applies both when performing code completion and when using ASTs as an intermediary for clang_createTranslationUnitFromSourceFile(). The serialized format is not perfect at the moment, because it does not encapsulate macro-instantiation information. Instead, it maps all source locations back to the instantiation location. However, it does maintain source-range and fix-it information. To get perfect fidelity from the serialized format would require serializing a large chunk of the source manager; at present, it isn't clear if this code will live long enough for that to matter. llvm-svn: 94740
* Predefine __weak attribute when doing objective-cFariborz Jahanian2010-01-131-2/+4
| | | | | | rewriting for any target. (refixes radar 7530235). llvm-svn: 93331
* cc1: Factor out CompilerInstance::ExecuteAction which has the majority of theDaniel Dunbar2010-01-131-0/+87
| | | | | | | | clang -cc1 logic for running an action against a set of options. - This should make it easier to build tools that have a clang -cc1 like interface, but aren't actually part of clang -cc1. llvm-svn: 93282
* Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.Daniel Dunbar2009-12-111-1/+1
| | | | llvm-svn: 91176
* Fix CompilerInstance::createOutputFile to use proper diagnostics, and (try ↵Daniel Dunbar2009-12-031-3/+3
| | | | | | to) update all clients to be able to handle failure. llvm-svn: 90437
* Remove an unnecessary (I believe) exit() on error.Daniel Dunbar2009-12-031-4/+0
| | | | llvm-svn: 90436
* Move file-remapping logic into InitPreprocesor. No functionality changeDouglas Gregor2009-12-021-39/+0
| | | | llvm-svn: 90322
* Introduce a new clang-cc option Douglas Gregor2009-12-021-0/+39
| | | | | | | | | | | | | | | | | | -remap-file=from;to which takes the file "from" and transparently replaces its contents with the contents of the file "to" from the source manager's perspective. This is the moral equivalent of cp from saved cp to from <call clang> cp saved from rm saved without all of the pesky file copying. llvm-svn: 90307
* Extend the source manager with the ability to override the contents ofDouglas Gregor2009-12-021-1/+1
| | | | | | | | | | files with the contents of an arbitrary memory buffer. Use this new functionality to drastically clean up the way in which we handle file truncation for code-completion: all of the truncation/completion logic is now encapsulated in the preprocessor where it belongs (<rdar://problem/7434737>). llvm-svn: 90300
* Switch the clang-to-CIndex interface for code-completion to a binary format, ↵Douglas Gregor2009-12-011-0/+7
| | | | | | for a massive speedup llvm-svn: 90209
* This patch moves the frontend timer from clang-cc into CompilerInstance.Kovarththanan Rajaratnam2009-11-291-0/+5
| | | | | | | | | | | CompilerInstance already contains various objects that are used throughout the entire run. Also addresses Daniels review comments in: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20091123/024508.html llvm-svn: 90073
* Fix refactoro, clang-cc wasn't properly reporting errors when opening an ↵Daniel Dunbar2009-11-201-5/+5
| | | | | | output file failed. llvm-svn: 89502
* Simplify PreprocessorOptions, it doesn't need abstracted field access.Daniel Dunbar2009-11-171-2/+2
| | | | llvm-svn: 89047
* Shuffle VerifyDiagnosticsClient API to be less fragile.Daniel Dunbar2009-11-141-3/+5
| | | | llvm-svn: 88765
* Add CompilerInstance::InitializeSourceManager.Daniel Dunbar2009-11-141-0/+38
| | | | llvm-svn: 88764
* Switch -verify implementation to use VerifyDiagnosticClient.Daniel Dunbar2009-11-141-8/+7
| | | | | | - Not tested, but -verify with multiple inputs should work now. llvm-svn: 88750
* Add ASTConsumer to CompilerInstance.Daniel Dunbar2009-11-141-0/+5
| | | | llvm-svn: 88743
* Move CompilerInstance::set* methods out-of-line.Daniel Dunbar2009-11-141-0/+32
| | | | llvm-svn: 88731
* Add CompilerInstance utility functions for creating output files.Daniel Dunbar2009-11-131-0/+62
| | | | llvm-svn: 88667
* Add output file list to CompilerInstance, so that it can track them instead ofDaniel Dunbar2009-11-131-0/+20
| | | | | | forcing all clients to do it. llvm-svn: 87103
* Add CodeCompletion consumer to CompilerInvocation.Daniel Dunbar2009-11-131-1/+42
| | | | llvm-svn: 87100
* Add CompilerInstance::createPCHExternalASTSource.Daniel Dunbar2009-11-131-0/+38
| | | | llvm-svn: 87097
* Add ASTContext to CompilerInstance.Daniel Dunbar2009-11-131-0/+12
| | | | llvm-svn: 87095
* Add CompilerInstance::createDiagnostics, and move clang-cc to it.Daniel Dunbar2009-11-131-0/+67
| | | | | | clang-cc.cpp is now under 1k lines, if anyone is counting. llvm-svn: 87090
* Add Preprocessor to CompilerInstance, and move clang-cc CreatePreprocessor toDaniel Dunbar2009-11-131-0/+52
| | | | | | CompilerInstance::createPreprocessor. llvm-svn: 87088
* Add {File,Source}Manager to CompilerInstance.Daniel Dunbar2009-11-131-0/+10
| | | | llvm-svn: 87079
* Add CompilerInstance, and starting moving clang-cc to it.Daniel Dunbar2009-11-131-0/+25
- The design philosophy is in the CompilerInstance doxyment, if you don't agree with it now would be a good time to speak up. llvm-svn: 87078
OpenPOWER on IntegriCloud