summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Lazy loading of builtins for precompiled headers.Douglas Gregor2009-04-221-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCH files now contain complete information about builtins, including any declarations that have been synthesized as part of building the PCH file. When using a PCH file, we do not initialize builtins at all; when needed, they'll be found in the PCH file. This optimization translations into a 9% speedup for "Hello, World!" with Carbon.h as a prefix header and roughly a 5% speedup for 403.gcc with its prefix header. We're also reading less of the PCH file for "Hello, World!": *** PCH Statistics: 286/20693 types read (1.382110%) 1630/59230 declarations read (2.751984%) 764/44914 identifiers read (1.701029%) 1/32954 statements read (0.003035%) 5/6187 macros read (0.080815%) down from *** PCH Statistics: 411/20693 types read (1.986179%) 2553/59230 declarations read (4.310316%) 1093/44646 identifiers read (2.448148%) 1/32954 statements read (0.003035%) 21/6187 macros read (0.339421%) llvm-svn: 69815
* Explictly track tentative definitions within Sema, then hand thoseDouglas Gregor2009-04-211-0/+4
| | | | | | | | | | | | | | | tentative definitions off to the ASTConsumer at the end of the translation unit. Eliminate CodeGen's internal tracking of tentative definitions, and instead hook into ASTConsumer::CompleteTentativeDefinition. Also, tweak the definition-deferal logic for C++, where there are no tentative definitions. Fixes <rdar://problem/6808352>, and will make it much easier for precompiled headers to cope with tentative definitions in the future. llvm-svn: 69681
* Add pch reader/writer support for most of DeclObjC.h. Very close to ↵Steve Naroff2009-04-211-2/+3
| | | | | | | | reading/writing all ObjC AST nodes that we will encounter in header files (still a few FIXME's). Once selector support is in place, we should be able to take this for a spin (and add test cases). llvm-svn: 69674
* Split preprocessor initialization logic out of clang-cc intoChris Lattner2009-04-211-486/+78
| | | | | | libfrontend. Patch by Alexei Svitkine! llvm-svn: 69664
* rename -fprint-source-range-info -> -fdiagnostics-print-source-range-info.Chris Lattner2009-04-211-2/+7
| | | | | | Temporarily accept both of them, I'll rip out the old one after awhile. llvm-svn: 69662
* Add pch reader/writer support for ObjCContainerDecl, ObjCInterfaceDecl, & ↵Steve Naroff2009-04-201-1/+1
| | | | | | | | ObjCIvarDecl. Next step: Add selector support to PCHWriter::AddDeclarationName(). llvm-svn: 69619
* Introduce the notion of a SemaConsumer, which is an ASTConsumer thatDouglas Gregor2009-04-201-3/+7
| | | | | | | | | also gets access to the Sema object performing semantic analysis. This will be used by the PCH writer to serialize Sema state. No functionality change. llvm-svn: 69595
* Make the on-disk hash table usable with non-fileDouglas Gregor2009-04-201-1/+1
| | | | | | raw_ostreams. Requires LLVM r69583. llvm-svn: 69584
* Move the on-disk hash table code into its own header. No functionality change.Douglas Gregor2009-04-201-160/+2
| | | | llvm-svn: 69580
* move group twiddling options into Diagnostic.cpp instead ofChris Lattner2009-04-191-49/+1
| | | | | | | Warnings.cpp. Warnings.cpp now doesn't need to #include tblgen produced output directly. llvm-svn: 69559
* Fix PR4007: clang doesn't know -Werror-foo is the same as -Werror=fooChris Lattner2009-04-191-2/+3
| | | | llvm-svn: 69557
* implement compiler support for -fno-diagnostics-fixit-info,Chris Lattner2009-04-191-2/+9
| | | | | | rdar://6805442 llvm-svn: 69525
* invalid directives can occur in #if 0 code, just pass themChris Lattner2009-04-191-1/+4
| | | | | | | through like other directives PTH doesn't care about. This should fix rdar://6804029 llvm-svn: 69524
* make PTH not crash on a null directive (# on its own line)Chris Lattner2009-04-191-2/+4
| | | | llvm-svn: 69523
* use isNot instead of !isChris Lattner2009-04-191-3/+4
| | | | llvm-svn: 69522
* fix -fdollars-in-identifiers to have a default that is overriden Chris Lattner2009-04-191-4/+5
| | | | | | by the command line option if present. llvm-svn: 69521
* fix rdar://6804322 by wiring up -fdollars-in-identifiersChris Lattner2009-04-191-7/+11
| | | | | | with assembler-with-cpp mode. llvm-svn: 69520
* FunctionDecl::getBody() is getting an ASTContext argument for use inDouglas Gregor2009-04-184-15/+17
| | | | | | | | lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. llvm-svn: 69406
* implement a new clang-cc option -dump-build-information=filename which ↵Chris Lattner2009-04-171-2/+90
| | | | | | | | | | | | | | causes the compiler to dump random stuff from the build into the file. Right now this amounts to dumping command line arguments and diagnostics to the file. The idea is that you can set an envvar, do a world build of an OS, then grep through all the logs for interesting things or something. Daniel, please wire the driver up to do something with this. llvm-svn: 69386
* refactor htmldiags to be created up front like the other diag clients.Chris Lattner2009-04-171-28/+20
| | | | llvm-svn: 69379
* add a virtual method to DiagnosticClient to get rid of some fragileChris Lattner2009-04-171-6/+3
| | | | | | casting in clang-cc. llvm-svn: 69377
* Added -print-ivar-layout option. No change in functionalityFariborz Jahanian2009-04-171-0/+7
| | | | | | yet. llvm-svn: 69346
* implement framework for -fdiagnostics-show-option, but tblgen isn'tChris Lattner2009-04-162-2/+5
| | | | | | passing down the right info yet. llvm-svn: 69268
* move handling of -pedantic and -pedantic-errors into Diagnostics,Chris Lattner2009-04-161-52/+14
| | | | | | | out of Warnings.cpp. This simplifies warnings.cpp and makes it more efficient. llvm-svn: 69266
* arrange for -Wno-error=foo warnings to be immune to -Werror as Chris Lattner2009-04-161-1/+1
| | | | | | they are supposed to be. llvm-svn: 69265
* when tblgen fills in all the subgroup info, clang is ready for it.Chris Lattner2009-04-161-11/+24
| | | | | | This depends on r69249 of llvm. llvm-svn: 69250
* make unknown warnings a warning, not an error.Chris Lattner2009-04-151-4/+5
| | | | llvm-svn: 69239
* add support for -Wextra and -WChris Lattner2009-04-151-1/+1
| | | | llvm-svn: 69236
* use tablgen-generated warning groups.Chris Lattner2009-04-151-49/+13
| | | | llvm-svn: 69221
* now that we've decoupled diagnostic classes from default mappings,Chris Lattner2009-04-151-17/+0
| | | | | | | move the remaining default mapping exceptions from C++ code into the .td files. llvm-svn: 69183
* rename variable in comment, not just in code :).Chris Lattner2009-04-151-3/+3
| | | | llvm-svn: 69166
* Rejigger how -pedantic and -pedantic-errors work and their interactionChris Lattner2009-04-151-5/+53
| | | | | | | | | | | | | | | | with other diagnostic mapping. In the new scheme, -Wfoo or -Wno-foo or -Werror=foo all override the -pedantic options, and __extension__ robustly silences all extension diagnostics in their scope. An added bonus of this change is that MAP_DEFAULT goes away, meaning that per-diagnostic mapping information can now be stored in 2 bits, doubling the density of the Diagnostic::DiagMapping array. This also substantially simplifies Diagnostic::getDiagnosticLevel. OTOH, this temporarily introduces some "macro intensive" code in Diagnostic.cpp. This will be addressed in a later patch. llvm-svn: 69154
* remove some commented out -Wstrict-selector-match stuff.Chris Lattner2009-04-151-3/+0
| | | | llvm-svn: 69148
* clean up error messages.Chris Lattner2009-04-151-4/+5
| | | | llvm-svn: 69142
* Add support for -Werror=foo and -Wno-error=fooChris Lattner2009-04-151-10/+12
| | | | llvm-svn: 69138
* refactor a bunch of the warning parsing stuff to simplify it. This removes theChris Lattner2009-04-151-102/+56
| | | | | | -Wfoo=ignore syntax. GCC supports -Wno-foo, no need to invent our own stuff. llvm-svn: 69136
* Add PCH support for ImplicitCastExprs. This is the first expressionDouglas Gregor2009-04-141-1/+8
| | | | | | | | | | kind PCH handles that has an expression as an operand, so most of this work is in the infrastructure to rebuild expression trees from the serialized representation. We now store expressions in post-order (e.g., Reverse Polish Notation), so that we can easily rebuild the appropriate expression tree. llvm-svn: 69101
* Change Lexer::MeasureTokenLength to take a LangOptions reference.Chris Lattner2009-04-145-48/+56
| | | | | | | | | | | | | | | | | | This allows it to accurately measure tokens, so that we get: t.cpp:8:13: error: unknown type name 'X' static foo::X P; ~~~~~^ instead of the woefully inferior: t.cpp:8:13: error: unknown type name 'X' static foo::X P; ~~~~ ^ Most of this is just plumbing to push the reference around. llvm-svn: 69099
* add support for -W[no-]extra-tokensChris Lattner2009-04-141-1/+3
| | | | llvm-svn: 69071
* When building a PCH file, don't perform end-of-translation-unitDouglas Gregor2009-04-141-1/+5
| | | | | | | | | wrap-up (e.g., turning tentative definitions into definitions). Also, very that, when we actually use the PCH file, we get the ride code generation for tentative definitions and definitions that show up in the PCH file. llvm-svn: 69043
* Clean up handling of visibility.Daniel Dunbar2009-04-141-25/+12
| | | | llvm-svn: 69027
* Reapply 68936, turned out to that clang's better debug info exposed aDaniel Dunbar2009-04-131-6/+0
| | | | | | codegenerator bug. llvm-svn: 68983
* Revert 68936, LLVM still isn't ready to handle debug info + optimization.Daniel Dunbar2009-04-131-0/+6
| | | | llvm-svn: 68972
* the driver caught up. This makes -msse3 correctly set __SSE3__ etc.Chris Lattner2009-04-131-3/+1
| | | | llvm-svn: 68943
* Enable debug info generation while optimizing.Devang Patel2009-04-131-6/+0
| | | | llvm-svn: 68936
* Implement support for GCC's -dD mode, which dumps -E output *and*Chris Lattner2009-04-121-54/+76
| | | | | | macro definitions. llvm-svn: 68884
* add some #includes for better compatibility with gcc 4.4,Chris Lattner2009-04-111-0/+1
| | | | | | thanks to Tobias Stadler for pointing this out. llvm-svn: 68868
* Compare the predefines buffer in the PCH file with the predefinesDouglas Gregor2009-04-101-57/+65
| | | | | | | | | | | | | | | buffer generated for the current translation unit. If they are different, complain and then ignore the PCH file. This effectively checks for all compilation options that somehow would affect preprocessor state (-D, -U, -include, the dreaded -imacros, etc.). When we do accept the PCH file, throw away the contents of the predefines buffer rather than parsing them, since all of the results of that parsing are already stored in the PCH file. This eliminates the ugliness with the redefinition of __builtin_va_list, among other things. llvm-svn: 68838
* do a dance with predefines, and finally enable reading of macros fromChris Lattner2009-04-101-6/+10
| | | | | | | PCH. This works now, except for limitations not being able to do things with identifiers. The basic example in the testcase works though. llvm-svn: 68832
* move a bunch of code for initializing the predefines buffer out of ↵Chris Lattner2009-04-101-0/+317
| | | | | | | | | | Preprocessor.cpp into clang-cc.cpp. This makes it so clang-cc constructs the *entire* predefines buffer, not just half of it. A bonus of this is that we get to kill a copy of DefineBuiltinMacro. llvm-svn: 68830
OpenPOWER on IntegriCloud