summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix multiple emission of the this-> fixit for each instantiation by fixing theNick Lewycky2010-07-063-5/+38
| | | | | | AST during the instantiation. Fixes PR7417! llvm-svn: 107690
* Make CGBuilderTy a typedef again; its functionality has been rolled backJohn McCall2010-07-061-49/+2
| | | | | | into IRBuilder. llvm-svn: 107687
* Improve the accuracy of getSourceRange() for DeclaratorDecl andDouglas Gregor2010-07-061-5/+24
| | | | | | | TagDecl subclasses when out-of-line template declaration information is available, from Peter Collingbourne! llvm-svn: 107686
* Correctly set the location of the "template" keyword for a classDouglas Gregor2010-07-061-1/+2
| | | | | | template specialization, from Peter Collingbourne. llvm-svn: 107682
* Remove my egregious hack that forced deserialization of visibleDouglas Gregor2010-07-061-31/+0
| | | | | | | | declarations when implicitly declaring the default constructor, copy constructor, destructor, and copy-assignment operators of a class. Argiris fixed the underlying problem in r107596. llvm-svn: 107681
* Pacify versions of gcc that think these variables may be usedDuncan Sands2010-07-061-3/+3
| | | | | | | uninitialized (which doesn't seem to be the case), by giving them arbitrary initial values. llvm-svn: 107679
* When destroying a cleanup, kill any references to instructions in the entryJohn McCall2010-07-061-0/+6
| | | | | | | | block before deleting it. Fixes PR7575. This really just a short-term fix before implementing lazy cleanups. llvm-svn: 107676
* Added several helper functions to Stmt to recursively check for different ↵Tom Care2010-07-061-0/+66
| | | | | | elements (macros, enum constants, etc). llvm-svn: 107675
* Read/write function template specializations for PCH, properly this time.Argyrios Kyrtzidis2010-07-062-6/+12
| | | | llvm-svn: 107665
* Add to PCH missing Sema information about VTable uses and dynamic classes.Argyrios Kyrtzidis2010-07-062-0/+58
| | | | llvm-svn: 107664
* Allow a CXXRecordDecl to get a DefinitionData pointer even when its owner is ↵Argyrios Kyrtzidis2010-07-062-87/+118
| | | | | | still initializing. llvm-svn: 107663
* Read/write instantiated-from-member of EnumDecl for PCH.Argyrios Kyrtzidis2010-07-062-2/+3
| | | | llvm-svn: 107662
* Add an assertion.Zhongxing Xu2010-07-061-0/+3
| | | | llvm-svn: 107645
* Collect function definitions in the Indexer when indexing through the ASTs.Zhongxing Xu2010-07-063-17/+64
| | | | | | Add an API to get an Entity associated with a name in the global namespace. llvm-svn: 107642
* When creating functions to run global initializers and destructors, mark themJohn McCall2010-07-061-0/+3
| | | | | | as nounwind in -fno-exceptions. Fixes rdar://problem/8090834. llvm-svn: 107639
* Remove the now-unused GRState::isEqual method. Instead of asking if an ↵Jordy Rose2010-07-061-25/+0
| | | | | | expression equals a certain value, use SValuator::EvalEQ and GRState::Assume to see if it can, must, or must not equal that value. llvm-svn: 107638
* Improve NULL-checking for CFRetain/CFRelease. We now remember that the ↵Jordy Rose2010-07-062-44/+52
| | | | | | argument was non-NULL, and we report where the null assumption came from (like AttrNonNullChecker already did). llvm-svn: 107633
* Validated by nightly-test runs on x86 and x86-64 darwin, including afterJohn McCall2010-07-0618-1794/+2964
| | | | | | | | | | | | | | | | | | | | | | | | self-host. Hopefully these results hold up on different platforms. I tried to keep the GNU ObjC runtime happy, but it's hard for me to test. Reimplement how clang generates IR for exceptions. Instead of creating new invoke destinations which sequentially chain to the previous destination, push a more semantic representation of *why* we need the cleanup/catch/filter behavior, then collect that information into a single landing pad upon request. Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional control flow) are generated, since it's actually fairly closely tied in with the former. Remove the need to track which cleanup scope a block is associated with. Document a lot of previously poorly-understood (by me, at least) behavior. The new framework implements the Horrible Hack (tm), which requires every landing pad to have a catch-all so that inlining will work. Clang no longer requires the Horrible Hack just to make exceptions flow correctly within a function, however. The HH is an unfortunate requirement of LLVM's EH IR. llvm-svn: 107631
* Local variables have no linkage, make invalid Entities.Zhongxing Xu2010-07-061-0/+4
| | | | llvm-svn: 107630
* Generate fewer first class aggregate values for otherChris Lattner2010-07-051-35/+13
| | | | | | | coerce cases (e.g. {double,int}) which avoids fastisel bailing out at -O0. llvm-svn: 107628
* in the "coerce" case, the ABI handling code ends up making theChris Lattner2010-07-053-8/+10
| | | | | | | | | alloca for an argument. Make sure the argument gets the proper decl alignment, which may be different than the type alignment. This fixes PR7567 llvm-svn: 107627
* fix a bug I introduced in r107624Chris Lattner2010-07-051-5/+2
| | | | llvm-svn: 107626
* rearrange some logic, no functionality change.Chris Lattner2010-07-051-19/+30
| | | | llvm-svn: 107624
* fix PR7564 a cast where the bitfield struct init codeChris Lattner2010-07-051-4/+31
| | | | | | wasn't handling array padding elements right. llvm-svn: 107621
* AppendBitField really can never fail, so return its return value. Chris Lattner2010-07-051-14/+8
| | | | | | Everyone knows that no bugs are ever possible with bitfields. llvm-svn: 107620
* Read/write the identifier namespace in PCH for decls that may modify it.Argyrios Kyrtzidis2010-07-052-6/+13
| | | | | | We can now use a PCH'ed <map>. llvm-svn: 107617
* Read/write some source location for PCH.Argyrios Kyrtzidis2010-07-053-4/+15
| | | | llvm-svn: 107616
* Support sizeof for VLA expressions (sizeof(someVLA)). sizeof(int[n]) still ↵Jordy Rose2010-07-051-3/+32
| | | | | | unimplemented. A VLA region's sizeof value matches its extent. llvm-svn: 107611
* Refrase comments.Zhongxing Xu2010-07-051-3/+3
| | | | llvm-svn: 107607
* Although in C++ class name has external linkage, usually the definition of the Zhongxing Xu2010-07-051-0/+8
| | | | | | | class is available in the same translation unit when it's needed. So we make all of them invalid Entity. llvm-svn: 107606
* Make FieldDecl an invalid Entity since it has no linkage.Zhongxing Xu2010-07-051-2/+2
| | | | llvm-svn: 107605
* Indexer: make FieldDecl an internal Entity.Zhongxing Xu2010-07-051-0/+6
| | | | llvm-svn: 107604
* Track extents for VLAs.Jordy Rose2010-07-052-7/+38
| | | | llvm-svn: 107603
* Fix a regression of a previous commit of mine (rdar://8158953).Argyrios Kyrtzidis2010-07-042-4/+28
| | | | | | | 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-044-0/+42
| | | | | | instantiated-from information. llvm-svn: 107597
* When adding a visible decl, deserialize the visible decls and add it.Argyrios Kyrtzidis2010-07-041-9/+10
| | | | | | | | | | Before this commit, visible decls added before deserialization were ignored. This was not an issue since name lookup (that usually comes before the addition) forces deserialization but it is an issue for lazily declared class implicit members. We can use a PCH'ed <string> now. llvm-svn: 107596
* Don't try to install the __[u]int128_t identifier if it is already installed ↵Argyrios Kyrtzidis2010-07-044-3/+9
| | | | | | | | | | 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
* Write/read ParmVarDecl's UninstantiatedDefaultArg for PCH.Argyrios Kyrtzidis2010-07-042-1/+8
| | | | llvm-svn: 107594
* Read/write specialization info of static data members for PCH.Argyrios Kyrtzidis2010-07-043-2/+23
| | | | llvm-svn: 107593
* Add a new symbol type, SymbolExtent, to represent the extents of memory ↵Jordy Rose2010-07-047-133/+148
| | | | | | | | | | regions that may not be known at compile-time (such as those created by malloc). This replaces the old setExtent/getExtent API on Store, which used the GRState's GDM to store SVals. Also adds a getKnownValue() method to SValuator, which gets the integer value of an SVal if it is known to only have one possible value. There are more places in the code that could be using this, but in general we want to be dealing entirely in SVals, so its usefulness is limited. The only visible functionality change is that extents are now honored for any DeclRegion, such as fields and Objective-C ivars, rather than just variables. This shows up in bounds-checking and cast-size-checking. llvm-svn: 107577
* Mark the operator delete associated with a virtual destructor as referenced.John McCall2010-07-031-0/+2
| | | | llvm-svn: 107573
* Mangle Objective-C pointers and block pointers in the Microsoft C++ Mangler.Charles Davis2010-07-031-13/+22
| | | | | | | | | | ObjC pointers were easy enough (as far as the ABI is concerned, they're just pointers to structs), but I had to invent a new mangling for block pointers. This is particularly worrying with the Microsoft ABI, because it is a vendor-specific ABI; extending it could come back to bite us later when MS extends it on their own (and you know they will). llvm-svn: 107572
* Provide convenience routines to save and restore the current insertionJohn McCall2010-07-031-3/+52
| | | | | | point. llvm-svn: 107570
* Fix mangling of array dimensions in the Microsoft C++ Mangler.Charles Davis2010-07-031-7/+7
| | | | llvm-svn: 107568
* Mangle member pointer types in the Microsoft C++ Mangler.Charles Davis2010-07-031-3/+15
| | | | llvm-svn: 107567
* When setting the anonymous namespace at PCH reading, it may still be ↵Argyrios Kyrtzidis2010-07-031-6/+2
| | | | | | | | initializing so avoid the invariant checks at NamespaceDecl::setAnonymousNamespace(). llvm-svn: 107566
* Fix mangling of function pointers in the Microsoft C++ Mangler.Charles Davis2010-07-031-0/+5
| | | | llvm-svn: 107564
* Fix mangling of array parameters for functions in the Microsoft C++ Mangler.Charles Davis2010-07-031-10/+21
| | | | | | | | | | | Only actual functions get mangled correctly; I don't know how to fix it for function pointers yet. Thanks to John McCall for the hint. Also, mangle anonymous tag types. I don't have a suitable testcase yet; I have a feeling that that's going to need support for static locals, and I haven't figured out exactly how MSVC's scheme for mangling those works. llvm-svn: 107561
* Lazily declare default constructors. We now delay the construction ofDouglas Gregor2010-07-037-21/+101
| | | | | | | | | | | | | | | | | | 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-026-19/+64
| | | | llvm-svn: 107543
OpenPOWER on IntegriCloud