summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* refactor interface to GenerateClassStructure to avoid converting a Chris Lattner2008-06-261-7/+6
| | | | | | string to LLVM IR and then regenerating the string from IR. llvm-svn: 52762
* remove the old getSelector implementation, which removes someChris Lattner2008-06-262-64/+2
| | | | | | calls to getStringValue llvm-svn: 52761
* avoid a lot of unneeded selector processing work by passing aroundChris Lattner2008-06-264-20/+10
| | | | | | selectors instead of Value*'s. llvm-svn: 52760
* use cheaper/simpler getselector call for @selector exprs.Chris Lattner2008-06-263-5/+5
| | | | llvm-svn: 52759
* start avoid doing lots of unneeded work handling selectorsChris Lattner2008-06-263-25/+43
| | | | llvm-svn: 52758
* improve indentation, avoid thrashing on maps and recalculating strings as much.Chris Lattner2008-06-262-33/+24
| | | | llvm-svn: 52757
* give CreateObjCRuntime a full CGM so it can get whatever state it needs, Chris Lattner2008-06-264-30/+16
| | | | | | | instead of passing in just a couple random things it currently happens to use. llvm-svn: 52756
* Fix 80 col violations, assert on assumptions.Chris Lattner2008-06-262-22/+23
| | | | llvm-svn: 52755
* a temporary minimal hack to get clang building after the getStringValue ↵Chris Lattner2008-06-261-7/+17
| | | | | | changes in llvm mainline. llvm-svn: 52753
* CF ref checker:Ted Kremenek2008-06-251-245/+406
| | | | | | | | | | | | | | Tracked objects now have their type information tracked with them. Enhanced summaries for ObjC methods to include the type information of the receiver. Used the enhanced summaries to support the idiom that NSWindow owns itself (it sends a release message to itself upon close). Added some comments. Did some cleanups with the checker logic using operator overloading (reduced redundant code which I was concerned about being the source of bugs). llvm-svn: 52741
* The assert at Sema::ObjCActOnStartOfMethodDef should check CurMethodDecl ↵Argyrios Kyrtzidis2008-06-251-1/+1
| | | | | | instead of CurFunctionDecl. llvm-svn: 52719
* Updated atomic intrinsic name from llvm r52706. Fixed dropped bit in shufps.Mon P Wang2008-06-251-4/+4
| | | | llvm-svn: 52707
* 'Educate' IdentifierResolver about the declaration context of CXXFieldDecls.Argyrios Kyrtzidis2008-06-241-0/+4
| | | | llvm-svn: 52698
* The only caller of this knows that the current token is l_brace, so this can ↵Argyrios Kyrtzidis2008-06-241-12/+1
| | | | | | be an assert; suggestion by Chris. llvm-svn: 52696
* Add parsing support for C++ classes.Argyrios Kyrtzidis2008-06-246-1/+448
| | | | | | | Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place. Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass. llvm-svn: 52694
* "Support for Objective-C message sends which return structures. Also ↵Chris Lattner2008-06-244-4/+102
| | | | | | | | includes a small fix for constant string handling that should have been in the last patch (sorry!) and a hook for generating selectors (rest of this implementation to follow in the next patch)." Patch by David Chisnall! llvm-svn: 52681
* "This is a small fix for a bug where static object instances were being ↵Chris Lattner2008-06-241-4/+6
| | | | | | | | incorrectly generated. The bug was caused by my inability to read the GNU libobjc source and is only apparent when JITing code (static compilation does not expose the bug due to the data layout of other globals)." Patch by David Chisnall! llvm-svn: 52680
* Update serialization for ObjCMessageExpr to handle additional bit-swizziling ↵Ted Kremenek2008-06-241-8/+12
| | | | | | of receiver information. llvm-svn: 52679
* ObjCMessageExpr objects that represent messages to class methods now can ↵Ted Kremenek2008-06-242-3/+45
| | | | | | contain the ObjCInterfaceDecl* of the target class if it was available when the ObjCMessageExpr object was constructed. The original interfaces of the class has been preserved (requiring no functionality changes from clients), but now a "getClasSInfo" method returns both the ObjCInterfaceDecl* and IdentifierInfo* of the target class. llvm-svn: 52676
* Remove unneeded method arguments.Ted Kremenek2008-06-241-10/+3
| | | | llvm-svn: 52668
* Cache ObjC summaries by IdentifierInfo*, not by ObjCInterfaceDecl.Ted Kremenek2008-06-241-12/+21
| | | | llvm-svn: 52667
* Added ObjCSummaryCache, a new summary cache object to cache summaries for ↵Ted Kremenek2008-06-231-0/+101
| | | | | | Objective-C methods. Instead of mapping from Selectors -> Summaries, we will now map from (ObjCInterfaceDecl*,Selectors) -> Summaries. This will allow more nuanced summary generation. This patch just swaps in the new data structure; the rest of the code works as before by allowing the ObjCInterfaceDecl* to be null. llvm-svn: 52653
* Rename summary methods for "instance methods" to "class methods" (the names ↵Ted Kremenek2008-06-231-33/+33
| | | | | | got screwed up). No functionality change. llvm-svn: 52650
* The CF retain/release checker now assumes that allocations do not fail. ↵Ted Kremenek2008-06-231-51/+18
| | | | | | Eventually we will add a flag to the driver to enable allocation failures (documented as a FIXME). llvm-svn: 52632
* add a fixme backChris Lattner2008-06-211-0/+1
| | | | llvm-svn: 52607
* "this patch adds code generation hooks for Objective-C constant strings. It ↵Chris Lattner2008-06-213-9/+18
| | | | | | | | also modifies Sema so that Objective-C constant strings are treated as untyped objects if the interface for the constant string class can not be found. This is consistent with Apple GCC. I thought it was consistent with GNU GCC, since this was causing failures when trying to compile GNUstep with (GNU) GCC, but it appears that this is not the case when attempting to produce a simple test case to demonstrate it. Possibly there is a way of making the error go away, but I haven't found out what it is yet." Patch by David Chisnall! llvm-svn: 52599
* Don't add isa with @defs only to work around it in the code generator, patchChris Lattner2008-06-212-8/+0
| | | | | | by David Chisnall. llvm-svn: 52597
* "This moves built-in Objective-C types up the scope chains to where they can ↵Chris Lattner2008-06-211-51/+34
| | | | | | | | | | be replaced by versions included from the runtime library's headers." This makes it ok to use @"foo" without a declaration for NSConstantString. Patch by David Chisnall! llvm-svn: 52593
* add parser and sema support for the funny ObjC '@defs' thing.Chris Lattner2008-06-213-13/+65
| | | | | | Patch by David Chisnall! llvm-svn: 52586
* remove dead enums.Chris Lattner2008-06-211-2/+0
| | | | llvm-svn: 52581
* Switch 'super' from being a weird cast thing to being a predefined expr node.Chris Lattner2008-06-213-17/+12
| | | | | | Patch by David Chisnall with objc rewriter and stmtdumper updates from me. llvm-svn: 52580
* K&R-style functions not allowed in C++.Argyrios Kyrtzidis2008-06-211-2/+3
| | | | llvm-svn: 52575
* When using the dead-stores checker with the BugReporter class, properly ↵Ted Kremenek2008-06-201-3/+8
| | | | | | capture the diagnostic associated with a specific warning and emit it. llvm-svn: 52565
* Modified the dead stores checker to...Ted Kremenek2008-06-204-34/+71
| | | | | | | | | | | | | | | | | 1) Check if a dead store appears as a subexpression. For such cases, we emit a verbose diagnostic so that users aren't confused. This addresses: <rdar://problem/5968508> checker gives misleading report for dead store in loop 2) Don't emit a dead store warning when assigning a null value to a pointer. This is a common form of defensive programming. We may wish to make this an option to the the checker one day. This addresses the feature request in the following email: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-June/001978.html llvm-svn: 52555
* Added ParentMap, a class to represent a lazily constructed mapping from ↵Ted Kremenek2008-06-201-0/+54
| | | | | | child to parents. llvm-svn: 52553
* Remove tabs.Mike Stump2008-06-191-2/+2
| | | | llvm-svn: 52507
* One more test checkin.Mike Stump2008-06-191-1/+1
| | | | | | Remove an extra space at the end of a line. llvm-svn: 52504
* Test commit to see if new account works.Mike Stump2008-06-191-60/+60
| | | | | | | I choose to remove extraneous whitespace at end of lines as a semantic nop for the test. llvm-svn: 52503
* Introduce initial transfer function support for __imag__ and __real__. We don'tTed Kremenek2008-06-191-3/+50
| | | | | | | have complex RValues yet, so this logic is only fully implemented when __imag__ and __real__ are used on non-complex types. llvm-svn: 52501
* Added a new ProgramPoint: PostPurgeDeadSymbols. This new program point ↵Ted Kremenek2008-06-183-31/+102
| | | | | | distinguishes between the cases when we just evaluated the transfer function of a Stmt* (PostStmt) or performed a load (PostLoad). This solves a caching bug observed in a recent bug report. llvm-svn: 52443
* Fix non-termination bug reported by Thomas Clement!Ted Kremenek2008-06-171-1/+25
| | | | llvm-svn: 52426
* Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.Chris Lattner2008-06-1714-151/+171
| | | | | | Patch by David Chisnall! llvm-svn: 52422
* Fix more strict-aliasing warnings.Ted Kremenek2008-06-172-22/+18
| | | | | | Fix indentation of class declarations in ExprCXX.h llvm-svn: 52380
* This patch is motivated by numerous strict-aliasing warnings when compilingTed Kremenek2008-06-179-181/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang as a Release build. The big change is that all AST nodes (subclasses of Stmt) whose children are Expr* store their children as Stmt* or arrays of Stmt*. This is to remove strict-aliasing warnings when using StmtIterator. None of the interfaces of any of the classes have changed (except those with arg_iterators, see below), as the accessor methods introduce the needed casts (via cast<>). While this extra casting may seem cumbersome, it actually adds some important sanity checks throughout the codebase, as clients using StmtIterator can potentially overwrite children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts provide extra sanity checks that are operational in debug builds to catch invariant violations such as these. For classes that have arg_iterators (e.g., CallExpr), the definition of arg_iterator has been replaced. Instead of it being Expr**, it is an actual class (called ExprIterator) that wraps a Stmt**, and provides the necessary operators for iteration. The nice thing about this class is that it also uses cast<> to type-checking, which introduces extra sanity checks throughout the codebase that are useful for debugging. A few of the CodeGen functions that use arg_iterator (especially from OverloadExpr) have been modified to take begin and end iterators instead of a base Expr** and the number of arguments. This matches more with the abstraction of iteration. This still needs to be cleaned up a little bit, as clients expect that ExprIterator is a RandomAccessIterator (which we may or may not wish to allow for efficiency of representation). This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c, which was already broken) on both a Debug and Release build, but it should obviously be reviewed. llvm-svn: 52378
* Silence uninitialized value warning in Release build.Ted Kremenek2008-06-161-4/+5
| | | | llvm-svn: 52376
* Silence uninitialized value warning during Release build.Ted Kremenek2008-06-161-4/+5
| | | | llvm-svn: 52375
* Introduce preliminary support for NSString format-string checking.Ted Kremenek2008-06-164-2/+38
| | | | | | Patch by Nikita Zhuk! llvm-svn: 52336
* force size of alloca to i32, which is currently required by LLVM IR.Chris Lattner2008-06-161-3/+6
| | | | | | This fixes use of alloca on 64-bit systems. llvm-svn: 52334
* Basic support for volatile loads and stores. Stores the volatile Eli Friedman2008-06-138-51/+112
| | | | | | | | | | qualifier in the lvalue, and changes lvalue loads/stores to honor the volatile flag. Places which need some further attention are marked with FIXMEs. Patch by Cédric Venet. llvm-svn: 52264
* Fix "copy & paste" error.Argyrios Kyrtzidis2008-06-111-3/+3
| | | | llvm-svn: 52227
OpenPOWER on IntegriCloud