summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* objective-c ivar refactoring patch. IterationsFariborz Jahanian2010-08-201-53/+29
| | | | | | | | over ivars for a varienty of puposes is now consolidated into two small routines; DeepCollectObjCIvars and ShallowCollectObjCIvars. llvm-svn: 111679
* Add some enum goodness as requested by Chris. Now instead of storing theCharles Davis2010-08-191-3/+5
| | | | | | | | | | active C++ ABI as a raw string, we store it as an enum. This should improve performance somewhat. And yes, this time, I started from a clean build directory, and all the tests passed. :) llvm-svn: 111507
* Generate Attr subclasses with TableGen.Alexis Hunt2010-08-181-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | Now all classes derived from Attr are generated from TableGen. Additionally, Attr* is no longer its own linked list; SmallVectors or Attr* are used. The accompanying LLVM commit contains the updates to TableGen necessary for this. Some other notes about newly-generated attribute classes: - The constructor arguments are a SourceLocation and a Context&, followed by the attributes arguments in the order that they were defined in Attr.td - Every argument in Attr.td has an appropriate accessor named getFoo, and there are sometimes a few extra ones (such as to get the length of a variadic argument). Additionally, specific_attr_iterator has been introduced, which will iterate over an AttrVec, but only over attributes of a certain type. It can be accessed through either Decl::specific_attr_begin/end or the global functions of the same name. llvm-svn: 111455
* StringRef'ication of lots stuff, patch by Peter Davies!Daniel Dunbar2010-08-171-3/+3
| | | | llvm-svn: 111314
* Implement support for member pointers under the Microsoft C++ ABI in theCharles Davis2010-08-161-5/+14
| | | | | | | | AST library. This also adds infrastructure for supporting multiple C++ ABIs in the AST. llvm-svn: 111117
* Remove dead code, caught by unused function warnings.Argyrios Kyrtzidis2010-08-151-14/+0
| | | | llvm-svn: 111091
* Commit improved version of 111026 & 111027.Argyrios Kyrtzidis2010-08-151-1/+2
| | | | | | | | | | | | | | | | | | | | Unused warnings for functions: -static functions -functions in anonymous namespace -class methods in anonymous namespace -class method specializations in anonymous namespace -function specializations in anonymous namespace Unused warnings for variables: -static variables -variables in anonymous namespace -static data members in anonymous namespace -static data members specializations in anonymous namespace Reveals lots of opportunities for dead code removal in llvm codebase that will interest my esteemed colleagues. llvm-svn: 111086
* Fixes block type matching bug. Radar 8302845.Fariborz Jahanian2010-08-121-1/+1
| | | | llvm-svn: 110950
* Added locations and type source info for DeclarationName.Abramo Bagnara2010-08-111-6/+16
| | | | llvm-svn: 110860
* Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,Douglas Gregor2010-08-111-18/+12
| | | | | | | | and create separate decl nodes for forward declarations and the definition," which appears to be causing significant Objective-C breakage. llvm-svn: 110803
* - Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for ↵Sebastian Redl2010-08-091-12/+18
| | | | | | | | | | forward declarations and the definition. - Eagerly create ObjCInterfaceTypes for declarations. - The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another. - Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated. llvm-svn: 110610
* Warn if class object does not implement qualifiedFariborz Jahanian2010-08-091-4/+4
| | | | | | id's protocols. Fixes radar 8154220. llvm-svn: 110583
* Allow reference binding of a reference of Objective-C object type toDouglas Gregor2010-08-071-0/+6
| | | | | | | | an lvalue of another, compatible Objective-C object type (e.g., a subclass). Introduce a new initialization sequence step kind to describe this binding, along with a new cast kind. Fixes PR7741. llvm-svn: 110513
* Introduce implicit conversions between AltiVec vectors and GCCDouglas Gregor2010-08-061-4/+23
| | | | | | vectors, from Anton Yartsev! llvm-svn: 110437
* Compute width/align of objc builtin types (id, etc)Fariborz Jahanian2010-08-021-0/+6
| | | | | | for radar 8258797. llvm-svn: 110047
* Change the name to something less terrible; suggestion by Doug. No ↵Argyrios Kyrtzidis2010-07-291-1/+1
| | | | | | functionality change. llvm-svn: 109797
* Weak references and variables that are not definitions are not required for ↵Argyrios Kyrtzidis2010-07-291-0/+7
| | | | | | early codegen/deserialization. llvm-svn: 109796
* Merge PCHWriterDecl.cpp's isRequiredDecl and ↵Argyrios Kyrtzidis2010-07-291-0/+160
| | | | | | | | | | | | | | | CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar. This is essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes. Since this logic is shared by CodeGen and the PCH mechanism, move it to the ASTContext, thus CodeGenModule's GetLinkageForFunction/GetLinkageForVariable and the GVALinkage enum is moved out of CodeGen. This fixes current (and avoids future) codegen-from-PCH bugs. llvm-svn: 109784
* Allow a looser form of compatibility checking (which ignoresDouglas Gregor2010-07-291-13/+59
| | | | | | | qualifiers) when checking a K&R function definition against a previous prototype. Fixes <rdar://problem/8193107>. llvm-svn: 109751
* Make ASTContext always use the BumpPtrAllocator.Douglas Gregor2010-07-251-51/+15
| | | | llvm-svn: 109375
* Vectors are not integer types, so the type system should not classifyDouglas Gregor2010-07-231-3/+3
| | | | | | | | | | | them as such. Type::is(Signed|Unsigned|)IntegerType() now return false for vector types, and new functions has(Signed|Unsigned|)IntegerRepresentation() cover integer types and vector-of-integer types. This fixes a bunch of latent bugs. Patch from Anton Yartsev! llvm-svn: 109229
* Patch to type match comparing Objective-C Classes which implement Fariborz Jahanian2010-07-191-1/+31
| | | | | | protocols (Radar 8191774). llvm-svn: 108758
* Reinstate the fix for PR7556. A silly use of isTrivial() wasDouglas Gregor2010-07-081-1/+4
| | | | | | suppressing copies of objects with trivial copy constructors. llvm-svn: 107857
* When printing statistics for the ASTContext, also print them for its ↵Douglas Gregor2010-07-071-0/+3
| | | | | | BumpPtrAllocator llvm-svn: 107790
* Fix a regression of a previous commit of mine (rdar://8158953).Argyrios Kyrtzidis2010-07-041-2/+26
| | | | | | | Some of the invariant checks for creating Record/Enum types don't hold true during PCH reading. Introduce more suitable ASTContext::getRecordType() and getEnumType(). llvm-svn: 107598
* Read/write more information of ASTContext for PCH. Overriden methods and ↵Argyrios Kyrtzidis2010-07-041-0/+10
| | | | | | instantiated-from information. llvm-svn: 107597
* Don't try to install the __[u]int128_t identifier if it is already installed ↵Argyrios Kyrtzidis2010-07-041-2/+2
| | | | | | | | | | by PCHReader. Currently, adding it to visible decls of a PCH'ed translation unit has no effect because adding visible decls before deserialization has no effect (the decls won't be visible). This will be fixed in a future commit; then it will force deserialization of visible decls, so avoid pointlessly installing it. llvm-svn: 107595
* Read/write specialization info of static data members for PCH.Argyrios Kyrtzidis2010-07-041-2/+3
| | | | llvm-svn: 107593
* Lazily declare default constructors. We now delay the construction ofDouglas Gregor2010-07-031-0/+5
| | | | | | | | | | | | | | | | | | declarations for implicit default constructors, copy constructors, copy assignment operators, and destructors. On a "simple" translation unit that includes a bunch of C++ standard library headers, we generate relatively few of these implicit declarations now: 4/159 implicit default constructors created 18/236 implicit copy constructors created 70/241 implicit copy assignment operators created 0/173 implicit destructors created And, on this translation unit, this optimization doesn't really provide any benefit. I'll do some more performance measurements soon, but this completes the implementation work for <rdar://problem/8151045>. llvm-svn: 107551
* Lazily declare implicit copy constructors.Douglas Gregor2010-07-021-0/+5
| | | | llvm-svn: 107543
* Lazily declare copy-assignment operators.Douglas Gregor2010-07-021-0/+5
| | | | llvm-svn: 107521
* Lazily declare the implicitly-declared destructor in a C++ class.Douglas Gregor2010-07-021-0/+7
| | | | llvm-svn: 107510
* Fully read/write CXXRecordDecl for PCH.Argyrios Kyrtzidis2010-07-021-2/+1
| | | | llvm-svn: 107475
* - Allow a typedef type to be read from PCH even if its decl is currently ↵Argyrios Kyrtzidis2010-07-021-37/+44
| | | | | | | | initializing. - Fix creation of TemplateSpecializationType. llvm-svn: 107471
* improve altivec vector bool/pixel support, patch by Anton YartsevChris Lattner2010-06-231-10/+15
| | | | | | with several tweaks by me. llvm-svn: 106619
* Patch to provide separate ASTs for multiple ObjC class extension Fariborz Jahanian2010-06-221-2/+4
| | | | | | declarations (implements radar 7928731). llvm-svn: 106597
* Change two static variables into instance variables of ASTContext. This ↵Ted Kremenek2010-06-181-3/+2
| | | | | | | | allows us to have multiple copies of ASTContext at the same time. llvm-svn: 106258
* Canonicalize template template parameters when canonicalizing aDouglas Gregor2010-06-161-3/+97
| | | | | | | template name that refers to such a parameter. It's amazing that this problem didn't surface earlier. Fixes PR7387. llvm-svn: 106147
* Revert r106099; it broke self-host.Douglas Gregor2010-06-161-4/+5
| | | | llvm-svn: 106100
* Added TemplateTypeParmType::getDecl().Abramo Bagnara2010-06-161-5/+4
| | | | llvm-svn: 106099
* Introduce Type::isIntegralOrEnumerationType(), to cover those placesDouglas Gregor2010-06-161-1/+1
| | | | | | | | | | in C++ that involve both integral and enumeration types. Convert all of the callers to Type::isIntegralType() that are meant to work with both integral and enumeration types over to Type::isIntegralOrEnumerationType(), to prepare to eliminate enumeration types as integral types. llvm-svn: 106071
* TemplateSpecializationType's isCurrentInstantiation bit can be derivedJohn McCall2010-06-131-12/+5
| | | | | | from its canonical type. llvm-svn: 105912
* Don't store ASTContext references in the TST nodes just to support profiling.John McCall2010-06-111-3/+5
| | | | llvm-svn: 105820
* Provide an Objective C mangling for wchar_t. Patch by Nico Weber!John McCall2010-06-111-0/+1
| | | | llvm-svn: 105818
* Split DependentNameType into two types. DependentNameType represents theJohn McCall2010-06-111-25/+50
| | | | | | | | | | | | | | case of an elaborated-type-specifier like 'typename A<T>::foo', and DependentTemplateSpecializationType represents the case of an elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc representation of a DependentTST conveniently exactly matches that of an ElaboratedType wrapping a TST. Kill off the explicit rebuild methods for RebuildInCurrentInstantiation; the standard implementations work fine because the nested name specifier is computable in the newly-entered context. llvm-svn: 105801
* Tweak our handling of the notion of a standard conversion sequenceDouglas Gregor2010-06-091-0/+42
| | | | | | | | | | | | | being a subsequence of another standard conversion sequence. Instead of requiring exact type equality for the second conversion step, require type *similarity*, which is type equality with cv-qualifiers removed at all levels. This appears to match the behavior of EDG and VC++ (albeit not GCC), and feels more intuitive. Big thanks to John for the line of reasoning that supports this change: since cv-qualifiers are orthogonal to the second conversion step, we should ignore them in the type comparison. llvm-svn: 105678
* Fix memory leak in ASTContext where ASTRecordLayout objects involving C++ ↵Ted Kremenek2010-06-081-7/+10
| | | | | | | | | structures wouldn't have their associated memory destroyed when using a BumpPtrAllocator. These objects internally use a DenseMap. llvm-svn: 105659
* Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.John McCall2010-06-041-0/+1
| | | | | | This is never null, but the associated type might be. llvm-svn: 105503
* Correctly align large arrays in x86-64. This fixes PR5599.Rafael Espindola2010-06-041-0/+9
| | | | llvm-svn: 105500
* Preserve more information from a block's original function declarator, if oneJohn McCall2010-06-041-1/+1
| | | | | | | was given. Remove some unnecessary accounting from BlockScopeInfo. Handle typedef'ed function types until such time as we decide not. llvm-svn: 105478
OpenPOWER on IntegriCloud