summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Parameterize the constant-generating macros in stdint.h with new built-inKen Dyck2009-11-161-1/+9
| | | | | | | __INTn_C_SUFFIX__ macros that are defined for types with corresponding constant suffixes (i.e. long and long long). llvm-svn: 88914
* Add TargetOptions and use it when constructing targets.Daniel Dunbar2009-11-153-13/+25
| | | | | | | | - This ended up being hard to factor, sorry for the large diff. - Some post-commit cleanup to come. llvm-svn: 88833
* Add FrontendActions for all preprocessor based clang-cc actions.Daniel Dunbar2009-11-141-1/+104
| | | | llvm-svn: 88774
* Add FrontendActions, which provides a FrontendAction interface to all the ↵Daniel Dunbar2009-11-142-0/+179
| | | | | | existing AST consumer based clang-cc actions. llvm-svn: 88773
* Add FrontendAction interface, for encapsulating a "clang-cc" style action.Daniel Dunbar2009-11-142-0/+226
| | | | llvm-svn: 88772
* Shuffle VerifyDiagnosticsClient API to be less fragile.Daniel Dunbar2009-11-142-31/+37
| | | | 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 VerifyDiagnosticsClient, to replace old -verify.Daniel Dunbar2009-11-142-0/+341
| | | | | | | | | | | | - This reimplements -verify as just another DiagnosticClient, which buffers the diagnostics and checks them when the source file is complete. There are some hacks to make this work, but they are all internal, and this exposes a better external interface. - This also tweaks a few things: o Errors are now just regular diagnostics. o Frontend diagnostics are now caught (for example, errors in command line arguments), although there isn't yet a way to specify that they are expected. That would be nice though. - Not yet used. llvm-svn: 88748
* 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 clang-cc option "--analyzer-experimental-internal-checks". ThisTed Kremenek2009-11-131-0/+4
| | | | | | | option enables new "internal" checks that will eventually be turned on by default but still require broader testing. llvm-svn: 88671
* Add CompilerInstance utility functions for creating output files.Daniel Dunbar2009-11-131-0/+62
| | | | llvm-svn: 88667
* Remove local splitLines reimplementation.Daniel Dunbar2009-11-131-29/+7
| | | | llvm-svn: 88661
* 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
* Use StringRef::split instead of SplitString.Rafael Espindola2009-11-131-3/+6
| | | | llvm-svn: 87085
* 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-132-0/+26
| | | | | | | - 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
* Only flush plist diagnostics once.Ted Kremenek2009-11-131-1/+7
| | | | llvm-svn: 87073
* Fix recently introduced use-after-free error reported in ↵Ted Kremenek2009-11-132-0/+4
| | | | | | <rdar://problem/7387478>. llvm-svn: 87072
* Move input kind identification (-x) into FrontendOptions.Daniel Dunbar2009-11-132-0/+32
| | | | llvm-svn: 87066
* Add clang-cc option "-analyzer-experimental-checks" to enable experimental ↵Ted Kremenek2009-11-131-1/+3
| | | | | | path-sensitive checks. The idea is to separate "barely working" or "skunkworks" checks from ones that should always run. Later we need more fine-grain checker control. llvm-svn: 87053
* Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.Chandler Carruth2009-11-121-33/+33
| | | | | | This resolves the layering violation where CodeGen depended on Frontend. llvm-svn: 86998
* Generalize stdint.h for non-8-bit-multiple types, patch by Chris Lattner2009-11-121-18/+21
| | | | | | | | | | Ken Dyck! "This adds definitions for types of 8-bit multiples from 8 to 64 to stdint.h and rationalizes the selection of types for the exact-width definitions in InitPreprocessor.cpp." llvm-svn: 86977
* do not store wchar/char16/char32/intmax width/alignment infoChris Lattner2009-11-121-5/+1
| | | | | | | into TargetInfo, just derive this based on the underlying type. This prevents them from getting out of synch, patch by Ken Dyck! llvm-svn: 86976
* Move warning options into DiagnosticOptions.Daniel Dunbar2009-11-121-8/+7
| | | | llvm-svn: 86968
* Avoid comparing string literals.Daniel Dunbar2009-11-121-3/+3
| | | | llvm-svn: 86967
* Use the --with-c-include-dirs configure option.Rafael Espindola2009-11-121-0/+9
| | | | llvm-svn: 86956
* Tweak PCH -include handling to make sure it matches the name as would be presentDaniel Dunbar2009-11-112-8/+15
| | | | | | in the predefines buffer. llvm-svn: 86903
* Always initialize the header search object as part of InitializePreprocessor;Daniel Dunbar2009-11-111-1/+7
| | | | | | not doing this has little to no utility. llvm-svn: 86883
* Allow Preprocessor to take ownership of the HeaderSearch object. I think it ↵Daniel Dunbar2009-11-111-2/+3
| | | | | | should probably always own the header search object, but I'm not sure... llvm-svn: 86882
* Sink AttachDependencyFileGen into CreatePreprocessor.Daniel Dunbar2009-11-111-5/+5
| | | | llvm-svn: 86881
* Add DependencyOutputOptions to wrap -M... options, and propogate toDaniel Dunbar2009-11-111-19/+25
| | | | | | CompilerInvocation and clang-cc. llvm-svn: 86880
* Move the ManagerRegistry to the Analysis library to resolve the layering ↵Chandler Carruth2009-11-113-22/+1
| | | | | | violation. llvm-svn: 86863
* Add PreprocessorOutputOptions to CompilerInvocation, and move initialization toDaniel Dunbar2009-11-111-1/+1
| | | | | | clang-cc/Options.cpp llvm-svn: 86828
* Add PreprocessorOutputOptions, for things like -dM, -C, -CC which control -EDaniel Dunbar2009-11-111-10/+16
| | | | | | mode. llvm-svn: 86827
* Allow TextDiagnosticPrinter to have optional ownership of its output stream.Daniel Dunbar2009-11-111-2/+9
| | | | llvm-svn: 86823
* Fix display of "ANALYZE" statements in AnalysisConsumer by correctly ↵Ted Kremenek2009-11-111-114/+146
| | | | | | resetting the flag indicating that the current Decl* has not yet been displayed. Also move this out of AnalysisManager, since AnalysisManager should not handle text output to the user. llvm-svn: 86812
* Redo how PCH handles its implicit include. Instead of treating this specially inDaniel Dunbar2009-11-112-4/+24
| | | | | | | | | | | | | | | the front-end (as far as the preprocessor goes), follow the usual logic of inserting the (original include path) name into the predefines buffer. This pushes the responsibility for handling this to PCH instead of the front-end. In PCH this requires being a little more clever when we diff the predefines buffers. Neither of these solutions are particularly great, I think what we eventually should do is something like gcc where we insert a special marker to indicate the PCH file, but then run the preprocessor as usual. This would be clearer and would allow us to drop the overly clever predefines handling. llvm-svn: 86806
* More StringRef simplification to PCHValidator::ReadPredefinesBuffer.Daniel Dunbar2009-11-111-27/+22
| | | | llvm-svn: 86805
* Rewrite splitLines using StringRef; this is much simpler, and also now avoidsDaniel Dunbar2009-11-111-26/+26
| | | | | | | | | | | | | tons of std::string trashing. I plan to move this and other fun string munging utilities to a StringRefExtras.h at some point if no one beats me to it. On a synthetic benchmark on x86_64, llvm-gcc actually generates code thats 10% faster using the StringRef version. gcc miscompiles the synthetic benchmark, which I'm crossing my fingers and hoping won't happen here. clang compiles the sythetic benchmark correctly (wootness), but the StringRef version is slower. Silly clang. llvm-svn: 86799
* Introduce a new representation for template templateDouglas Gregor2009-11-112-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | parameters. Rather than storing them as either declarations (for the non-dependent case) or expressions (for the dependent case), we now (always) store them as TemplateNames. The primary change here is to add a new kind of TemplateArgument, which stores a TemplateName. However, making that change ripples to every switch on a TemplateArgument's kind, also affecting TemplateArgumentLocInfo/TemplateArgumentLoc, default template arguments for template template parameters, type-checking of template template arguments, etc. This change is light on testing. It should fix several pre-existing problems with template template parameters, such as: - the inability to use dependent template names as template template arguments - template template parameter default arguments cannot be instantiation However, there are enough pieces missing that more implementation is required before we can adequately test template template parameters. llvm-svn: 86777
* StringRefify some PCH interfaces.Daniel Dunbar2009-11-112-31/+24
| | | | llvm-svn: 86775
* Replace startsWith functions with StringRef.Daniel Dunbar2009-11-111-25/+4
| | | | llvm-svn: 86774
* Add Diagnostic::Report method for reporting diagnostics without a location.Daniel Dunbar2009-11-101-2/+1
| | | | llvm-svn: 86760
OpenPOWER on IntegriCloud