summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
Commit message (Collapse)AuthorAgeFilesLines
* Added a flag to identify resolved overloaded function references.Abramo Bagnara2011-10-053-4/+17
| | | | llvm-svn: 141171
* Improve location fidelity of objc decls.Argyrios Kyrtzidis2011-10-042-10/+9
| | | | | | | | -Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl. -Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the class name, not the location of '@'. llvm-svn: 141061
* Allow getting all source locations of selector identifiers in a ObjCMethodDecl.Argyrios Kyrtzidis2011-10-032-2/+17
| | | | | | | | | | | | | Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: -(id)first:(int)x second:(int)y; -With a space between the arguments: -(id)first: (int)x second: (int)y; -For nullary selectors, immediately before ';': -(void)release; In such cases we infer the locations instead of storing them. llvm-svn: 140989
* Allow getting all source locations of selector identifiers in a ObjCMessageExpr.Argyrios Kyrtzidis2011-10-032-3/+15
| | | | | | | | | | | | | Instead of always storing all source locations for the selector identifiers we check whether all the identifiers are in a "standard" position; "standard" position is -Immediately before the arguments: [foo first:1 second:2] -With a space between the arguments: [foo first: 1 second: 2] -For nullary selectors, immediately before ']': [foo release] In such cases we infer the locations instead of storing them. llvm-svn: 140987
* Pass from the parser the locations of selector identifiers when creatingArgyrios Kyrtzidis2011-10-031-0/+1
| | | | | | | | objc method decls. They are not stored in the AST yet. llvm-svn: 140984
* Don't keep NumSelectorArgs in the ObjCMethodDecl, the number can be derived ↵Argyrios Kyrtzidis2011-10-032-4/+1
| | | | | | from the selector. llvm-svn: 140983
* Mark a TagDecl when it is free standing (e.g. "struct foo;")Argyrios Kyrtzidis2011-09-302-0/+4
| | | | llvm-svn: 140894
* Basic/Diagnostic: Add a DiagSate::getOrAddMappingInfo method.Daniel Dunbar2011-09-291-1/+1
| | | | | | - Also, spell const_iterator as const_iterator. llvm-svn: 140765
* Basic/Diagnostics: Add a DiagnosticMappingInfo helper class, and switch toDaniel Dunbar2011-09-291-4/+3
| | | | | | | storing mappings with that instead of straying some magic constants about the source. llvm-svn: 140760
* Add a comment in ASTReader::ReadPragmaDiagnosticMappings that the user bitArgyrios Kyrtzidis2011-09-261-0/+1
| | | | | | is set by the setDiagnosticMapping call. llvm-svn: 140578
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-253-8/+8
| | | | llvm-svn: 140478
* Fix up assertion a bit moreDouglas Gregor2011-09-231-1/+1
| | | | llvm-svn: 140424
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-233-5/+0
| | | | llvm-svn: 140407
* Eliminate an MSVC comparison warning, from Aaron BallmanDouglas Gregor2011-09-231-1/+1
| | | | llvm-svn: 140388
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-235-11/+11
| | | | llvm-svn: 140367
* Do manual binary search for preprocessing entities because their end locationsArgyrios Kyrtzidis2011-09-221-3/+22
| | | | | | may be unordered and MSVC's debug-mode doesn't like it. llvm-svn: 140337
* Don't use TemplateArgumentListInfo inside AST nodes because it may leak.Argyrios Kyrtzidis2011-09-222-9/+11
| | | | | | Use ASTTemplateArgumentListInfo instead. llvm-svn: 140331
* Rename ExplicitTemplateArgumentList -> ASTTemplateArgumentListInfo, no ↵Argyrios Kyrtzidis2011-09-222-7/+7
| | | | | | functionality change. llvm-svn: 140330
* ArrayRef-ifying Function/BlockDecl's setParamsDavid Blaikie2011-09-211-2/+2
| | | | llvm-svn: 140268
* Fix MSVC9 build by providing a full comparator object to lower_bound.Benjamin Kramer2011-09-211-2/+8
| | | | llvm-svn: 140238
* [PCH] Don't store the source range for each preprocessed entity sinceArgyrios Kyrtzidis2011-09-202-27/+15
| | | | | | we already have the range in the PPEntityOffsets array. llvm-svn: 140209
* [PCH] Merge ASTReader::LoadPreprocessedEntity with ReadPreprocessedEntityArgyrios Kyrtzidis2011-09-202-97/+94
| | | | | | and don't store the ID for each preprocessed entity. llvm-svn: 140208
* The location of the name in MacroDefinition is the beginning of its range,Argyrios Kyrtzidis2011-09-202-2/+0
| | | | | | don't store an extra location for it. llvm-svn: 140190
* In libclang, when visiting preprocessed entities in a source range, useArgyrios Kyrtzidis2011-09-193-33/+1
| | | | | | | | | | PreprocessingRecord's getPreprocessedEntitiesInRange. Also remove all the stuff that were added in ASTUnit that are unnecessary now that we do a binary search for preprocessed entities and deserialize only what is necessary. llvm-svn: 140063
* Introduce local_begin()/local_end() methods in PreprocessingRecord whichArgyrios Kyrtzidis2011-09-191-3/+3
| | | | | | return iterators for local, non-loaded, preprocessed entities. llvm-svn: 140062
* [libclang] When getting a source location from a file:line:col tripletArgyrios Kyrtzidis2011-09-191-13/+5
| | | | | | | check whether the requested location points inside the precompiled preamble, in which case the returned source location will be a "loaded" one. llvm-svn: 140060
* Introduce PreprocessingRecord::getPreprocessedEntitiesInRange()Argyrios Kyrtzidis2011-09-192-7/+133
| | | | | | | | | | which will do a binary search and return a pair of iterators for preprocessed entities in the given source range. Source ranges of preprocessed entities are stored twice currently in the PCH/Module file but this will be fixed in a subsequent commit. llvm-svn: 140058
* Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis2011-09-191-2/+2
| | | | | | It already works (and is useful with) macro locs as well. llvm-svn: 140057
* Const-ify some methods in ASTReader.Argyrios Kyrtzidis2011-09-191-2/+2
| | | | llvm-svn: 140054
* [PCH] Preload the PreloadSLocEntries through the SourceManager andArgyrios Kyrtzidis2011-09-191-3/+5
| | | | | | | | don't call ReadSLocEntryRecord() directly because the entry may have already been loaded in which case calling ReadSLocEntryRecord() directly would trigger an assertion in SourceManager. llvm-svn: 140052
* With modules, we can end up loading a new module after we've seen anDouglas Gregor2011-09-171-7/+69
| | | | | | | | | arbitrary amount of code. This forces us to stage the AST writer more strictly, ensuring that we don't assign a declaration ID to a declaration until after we're certain that no more modules will get loaded. llvm-svn: 139974
* When we load the first module, make sure that we wire up the ASTConsumer to ↵Douglas Gregor2011-09-151-0/+1
| | | | | | the newly-created ASTReader. This makes sure that CodeGen sees the declarations it is interested in llvm-svn: 139824
* [PCH] Overhaul how preprocessed entities are [de]serialized.Argyrios Kyrtzidis2011-09-153-198/+72
| | | | | | | | | | | | | -Use an array of offsets for all preprocessed entities -Get rid of the separate array of offsets for just macro definitions; for references to macro definitions use an index inside the preprocessed entities array. -Deserialize each preprocessed entity lazily, at first request; not in bulk. Paves the way for binary searching of preprocessed entities that will offer efficiency and will simplify things on the libclang side a lot. llvm-svn: 139809
* Don't try to write a macro offset for an identifier that names a ↵Douglas Gregor2011-09-141-17/+13
| | | | | | non-exported macro, for real this time llvm-svn: 139745
* Revert my exported-macro hackery. Something is amissDouglas Gregor2011-09-141-12/+13
| | | | llvm-svn: 139734
* Make sure that we actually keep the key length and data length in sync when ↵Douglas Gregor2011-09-141-14/+12
| | | | | | dealing with non-exported macros llvm-svn: 139731
* Don't try to write a macro offset for an identifier that names a ↵Douglas Gregor2011-09-141-1/+2
| | | | | | non-exported macro llvm-svn: 139728
* [PCH] Fix a regression that r139441 introduced (decls were getting passedArgyrios Kyrtzidis2011-09-133-11/+28
| | | | | | | | | | | | | | | | | to the consumer without being fully deserialized). The regression was on compiling boost.python and it was too difficult to get a reduced test case unfortunately. Also modify the logic of how objc methods are getting passed to the consumer; codegen depended on receiving objc methods before the implementation decl. Since the interesting objc methods are ones with a body and such methods only exist inside an ObjCImplDecl, deserialize and pass to consumer all the methods of ObCImplDecl when we see one. Fixes http://llvm.org/PR10922 & rdar://10117105. llvm-svn: 139644
* Switch the serialization of LangOptions over to use the .def file. WeDouglas Gregor2011-09-132-251/+35
| | | | | | | should no longer have the serialization of LangOptions out of sync with the structure itself (yay). llvm-svn: 139613
* Switch LangOptions over to a .def file that describes header of theDouglas Gregor2011-09-132-8/+8
| | | | | | | | | | language options. Use that .def file to declare the LangOptions class and initialize all of its members, eliminating a source of annoying initialization bugs. AST serialization changes are next up. llvm-svn: 139605
* Keep the source range of attributes. Depends on a llvm tablegen commit.Argyrios Kyrtzidis2011-09-132-2/+2
| | | | llvm-svn: 139600
* [libclang] In ASTUnit::Parse copy the CompilerInvocation object instead ofArgyrios Kyrtzidis2011-09-121-1/+5
| | | | | | | | | | | | modifying directly for the preamble. This avoids an awful, hard to find, bug where "PreprocessorOpts.DisablePCHValidation = true" would be persistent for subsequent reparses of the translation unit which would result in defines, present in command-line but not in the PCH, being ignored. Fixes rdar://9615399. llvm-svn: 139512
* remove pedantic ;Chris Lattner2011-09-101-1/+1
| | | | llvm-svn: 139472
* Don't crash when we fail to load a module. It's unbecoming of aDouglas Gregor2011-09-101-77/+79
| | | | | | well-bred compiler like Clang. llvm-svn: 139442
* Clean up our handling of Objective-C definitions in AST files. RatherDouglas Gregor2011-09-102-6/+17
| | | | | | | | | than having CodeGen check whether a declaration comes from an AST file (which it shouldn't know or care about), make sure that the AST writer and reader pass along "interesting" declarations that CodeGen needs to know about. llvm-svn: 139441
* Kill of the Decl::PCHLevel field entirely. We now only need to knowDouglas Gregor2011-09-102-16/+1
| | | | | | whether a Decl was deserialized from an AST file (any AST file). llvm-svn: 139438
* Eliminate all but one caller of Decl::getPCHLevel()Douglas Gregor2011-09-092-4/+2
| | | | llvm-svn: 139430
* Introduce a new predicate Decl::isFromASTFile() to determine whether aDouglas Gregor2011-09-092-24/+24
| | | | | | | | declaration was deserialized from an AST file. Use this instead of Decl::getPCHLevel() wherever possible. This is a simple step toward killing off Decl::getPCHLevel(). llvm-svn: 139427
* In the ASTReader, replace the never-NULL Preprocessor pointer with aDouglas Gregor2011-09-091-85/+59
| | | | | | | Preprocessor reference. Simplify some code along the way, so there is no separate "initialize the preprocessor" step. llvm-svn: 139418
* In ASTReader, replace the never-NULL ASTContext pointer with anDouglas Gregor2011-09-093-328/+294
| | | | | | | | ASTContext reference. Remove all of the extra checking and logic that was used to cope with a NULL ASTContext. No effective functionality change. llvm-svn: 139413
OpenPOWER on IntegriCloud