summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Reinstate my CodeModificationHint -> FixItHint renaming patch, withoutDouglas Gregor2010-03-313-16/+15
| | | | | | the C-only "optimization". llvm-svn: 100022
* Rename TypenameType to DependentNameType in anticipation of someDouglas Gregor2010-03-312-2/+2
| | | | | | refactoring work in this area. llvm-svn: 100019
* Revert r100008, which inexplicably breaks the clang-i686-darwin10 builderDouglas Gregor2010-03-313-15/+16
| | | | llvm-svn: 100018
* Rename CodeModificationHint to FixItHint, since we've been using theDouglas Gregor2010-03-313-16/+15
| | | | | | | term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. llvm-svn: 100008
* Remember the regparm attribute in FunctionType::ExtInfo.Rafael Espindola2010-03-302-5/+8
| | | | | | Fixes PR3782. llvm-svn: 99940
* the big refactoring bits of PR3782.Rafael Espindola2010-03-303-31/+32
| | | | | | | | This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. llvm-svn: 99920
* Teach Clang's -cc1 option -print-stats to print LLVM statistics.Douglas Gregor2010-03-301-0/+4
| | | | llvm-svn: 99894
* Implement support for -nostdc++. Fixes PR6446.Douglas Gregor2010-03-242-4/+10
| | | | llvm-svn: 99417
* PPCallbacks: Add hook for reaching the end of the main file, and fix ↵Daniel Dunbar2010-03-232-4/+9
| | | | | | DependencyFile to not do work in its destructor. llvm-svn: 99257
* Keep track of the size/modification time of each file source-locationDouglas Gregor2010-03-212-5/+19
| | | | | | | entry in a precompiled header, so that we can detect modified files even when we miss in the stat cache. llvm-svn: 99149
* C++: Add support for -fno-use-cxa-atexit.Daniel Dunbar2010-03-201-3/+6
| | | | | | | | - So much typing, so little gain... Also, rename the __cxx_global_initialization function just to match llvm-gcc. llvm-svn: 99039
* Remove the capture, serialization, and deserialization of commentDouglas Gregor2010-03-192-33/+2
| | | | | | | | ranges as part of the ASTContext. This code is not and was never used, but contributes ~250k to the size of the Cocoa.h precompiled header. llvm-svn: 99007
* Implement serialization and lazy deserialization of the preprocessingDouglas Gregor2010-03-192-8/+206
| | | | | | | | | | | | | | | | | | | | | | | | record (which includes all macro instantiations and definitions). As with all lay deserialization, this introduces a new external source (here, an external preprocessing record source) that loads all of the preprocessed entities prior to iterating over the entities. The preprocessing record is an optional part of the precompiled header that is disabled by default (enabled with -detailed-preprocessing-record). When the preprocessor given to the PCH writer has a preprocessing record, that record is written into the PCH file. When the PCH reader is given a PCH file that contains a preprocessing record, it will be lazily loaded (which, effectively, implicitly adds -detailed-preprocessing-record). This is the first case where we have sections of the precompiled header that are added/removed based on a compilation flag, which is unfortunate. However, this data consumes ~550k in the PCH file for Cocoa.h (out of ~9.9MB), and there is a non-trivial cost to gathering this detailed preprocessing information, so it's too expensive to turn on by default. In the future, we should investigate a better encoding of this information. llvm-svn: 99002
* clang -cc1: Kill off -empty-input only, and replace with -init-only which is anDaniel Dunbar2010-03-193-9/+16
| | | | | | | | 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-193-16/+9
| | | | | | tie its creation to a CC1 flag -detailed-preprocessing-record. llvm-svn: 98963
* Add bounds check in PCHReader. when reading source file entry recordTed Kremenek2010-03-181-0/+5
| | | | llvm-svn: 98873
* Introduce the notion of a "preprocessing record", which keeps track ofDouglas Gregor2010-03-181-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | the macro definitions and macro instantiations that are found during preprocessing. Preprocessing records are *not* generated by default; rather, we provide a PPCallbacks subclass that hooks into the existing callback mechanism to record this activity. The only client of preprocessing records is CIndex, which keeps track of macro definitions and instantations so that they can be exposed via cursors. At present, only token annotation uses these facilities, and only for macro instantiations; both will change in the near future. However, with this change, token annotation properly annotates macro instantiations that do not produce any tokens and instantiations of macros that are later undef'd, improving our consistency. Preprocessing directives that are not macro definitions are still handled by clang_annotateTokens() via re-lexing, so that we don't have to track every preprocessing directive in the preprocessing record. Performance impact of preprocessing records is still TBD, although it is limited to CIndex and therefore out of the path of the main compiler. llvm-svn: 98836
* Make some typedefs privateKovarththanan Rajaratnam2010-03-181-2/+3
| | | | llvm-svn: 98817
* Rename variable to indicate what it is being used forKovarththanan Rajaratnam2010-03-181-4/+4
| | | | llvm-svn: 98816
* Turn several PCH reader assertions into compiler errors, thus makingTed Kremenek2010-03-181-30/+94
| | | | | | the PCHReader more robust to corrupt or invalid PCH files. llvm-svn: 98788
* Entering the main source file in the preprocessor can fail if theDouglas Gregor2010-03-174-8/+16
| | | | | | source file has been changed. Handle that failure more gracefully. llvm-svn: 98727
* Simplify error path using OwningPtrKovarththanan Rajaratnam2010-03-171-4/+3
| | | | llvm-svn: 98722
* Simplify ProcessWarningOptions since it can't failKovarththanan Rajaratnam2010-03-172-5/+2
| | | | llvm-svn: 98721
* Issue a proper diagnostic if we couldn't open dump fileKovarththanan Rajaratnam2010-03-171-7/+6
| | | | llvm-svn: 98719
* Don't "take" the file manager and source manager whenDouglas Gregor2010-03-171-2/+0
| | | | | | | ASTUnit::LoadFromCompilerInvocation() fails to create target information. llvm-svn: 98697
* Make sure we actually override ReadHeaderFileInfo when we meant toDouglas Gregor2010-03-161-1/+1
| | | | llvm-svn: 98655
* Fix header-search problems with precompiled headers, where theDouglas Gregor2010-03-162-28/+27
| | | | | | | | | | | | | | | | | | | | | | presence or absence of header map arguments when using the precompiled header would cause Clang to get confused about which headers had already been included/imported, along with their controlling macros. The fundamental problem is that the serialization of the header search information was relying on the UIDs of FileEntry objects at PCH generation time and PCH load time to be equivalent, which effectively means that we had to probe the same files in the same order. Differing header map arguments caused an extra FileEntry lookup, but it's easy to imagine other minor command-line arguments triggering this problem. Header-search information is now encoded along with the source-location entry for a file, so that we register information about a file's properties as a header at the same time we create the FileEntry for that file. Fixes <rdar://problem/7743243>. llvm-svn: 98636
* Switch another function to StringRef instead of char pointer pairs.Benjamin Kramer2010-03-161-4/+4
| | | | llvm-svn: 98631
* Let SourceManager::getBufferData return StringRef instead of a pair of two ↵Benjamin Kramer2010-03-162-12/+8
| | | | | | const char*. llvm-svn: 98630
* Don't consume tokens past the end-of-file in an @interface. FixesDouglas Gregor2010-03-161-0/+2
| | | | | | <rdar://problem/7735566>. llvm-svn: 98613
* Use SourceManager's Diagnostic object for all file-reading errors,Douglas Gregor2010-03-162-2/+3
| | | | | | simplifying the SourceManager interfaces somewhat. llvm-svn: 98598
* Give SourceManager a Diagnostic object with which to report errors,Douglas Gregor2010-03-164-26/+14
| | | | | | and start simplifying the interfaces in SourceManager that can fail. llvm-svn: 98594
* Introduce a new BufferResult class to act as the return type ofDouglas Gregor2010-03-152-5/+22
| | | | | | | | | | | | | | SourceManager's getBuffer() (and similar) operations. This abstract can be used to force callers to cope with errors in getBuffer(), such as missing files and changed files. Fix a bunch of callers to use the new interface. Add some very basic checks for file consistency (file size, modification time) into ContentCache::getBuffer(), although these checks don't help much until we've updated the main callers (e.g., SourceManager::getSpelling()). llvm-svn: 98585
* Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804.John McCall2010-03-151-0/+3
| | | | llvm-svn: 98541
* Remember declaration scope qualifiers in the AST. Imposes no memory overheadJohn McCall2010-03-152-3/+7
| | | | | | | | | | | on unqualified declarations. Patch by Enea Zaffanella! Minimal adjustments: allocate the ExtInfo nodes with the ASTContext and delete them during Destroy(). I audited a bunch of Destroy methods at the same time, to ensure that the correct teardown was being done. llvm-svn: 98540
* Add EmitString helper methodKovarththanan Rajaratnam2010-03-141-2/+6
| | | | llvm-svn: 98488
* Unbreak last commit. This should have been part of r98478.Kovarththanan Rajaratnam2010-03-141-3/+3
| | | | llvm-svn: 98480
* Pass file string by referenceKovarththanan Rajaratnam2010-03-141-6/+4
| | | | llvm-svn: 98478
* Path related cleanup. Remove unnecessary variables.Kovarththanan Rajaratnam2010-03-141-6/+2
| | | | llvm-svn: 98473
* Use makeAbsolute()Kovarththanan Rajaratnam2010-03-142-32/+19
| | | | llvm-svn: 98472
* Move to anonymous namespaceKovarththanan Rajaratnam2010-03-141-1/+1
| | | | llvm-svn: 98469
* Simplify code.Benjamin Kramer2010-03-131-11/+5
| | | | llvm-svn: 98437
* Use SmallString instead of SmallVectorKovarththanan Rajaratnam2010-03-133-14/+14
| | | | llvm-svn: 98436
* No need to call setIdentifierInfo() after LookUpIdentifierInfo() which ↵Kovarththanan Rajaratnam2010-03-132-4/+3
| | | | | | LookUpIdentifierInfo() will automatically do llvm-svn: 98435
* Allow users to set CPPFLAGS and CXXFLAGS on the make command line.Jeffrey Yasskin2010-03-121-1/+1
| | | | | Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test) llvm-svn: 98399
* Remember whether a ParmVarDecl was spelled with a default argument orJohn McCall2010-03-122-1/+5
| | | | | | | | whether it inherited one from a previous declaration. Patch by Enea Zaffanella! llvm-svn: 98362
* Add IdentifierTable::get() overload and start using itKovarththanan Rajaratnam2010-03-121-1/+1
| | | | llvm-svn: 98343
* Add tentative support for accessing local variables withFariborz Jahanian2010-03-111-7/+63
| | | | | | | external linkage (static, extern, etc.) in blocks in rewriter. wip. llvm-svn: 98265
* Change the 'super' messaging API in the rewriter.Fariborz Jahanian2010-03-101-23/+62
| | | | | | Fixes radar 7738452. llvm-svn: 98190
* Create a new InjectedClassNameType to represent bare-word references to the John McCall2010-03-102-0/+18
| | | | | | | | | | | | | injected class name of a class template or class template partial specialization. This is a non-canonical type; the canonical type is still a template specialization type. This becomes the TypeForDecl of the pattern declaration, which cleans up some amount of code (and complicates some other parts, but whatever). Fixes PR6326 and probably a few others, primarily by re-establishing a few invariants about TypeLoc sizes. llvm-svn: 98134
OpenPOWER on IntegriCloud