Commit Graph

5335 Commits

Author SHA1 Message Date
Cedric Venet 68cbee847e Another class -> struct in declaration to match definition.
llvm-svn: 52782
2008-06-26 12:50:52 +00:00
Matthijs Kooijman 0fb56e50b1 Make clang work on 32 bit powerpc linux.
Patch by Nick Lewycky!

llvm-svn: 52777
2008-06-26 08:39:30 +00:00
Matthijs Kooijman 70574af7d8 Link in LLVMAnalysis after LLVMCodeGen, since the latter depends on the former
since LLVM r52748.

llvm-svn: 52776
2008-06-26 08:37:29 +00:00
Chris Lattner cf31de3760 Make Declarator::getDeclSpec() return a const reference to avoid
cases where mutation can introduce bugs.  Propagate around 'const'.

llvm-svn: 52772
2008-06-26 06:49:43 +00:00
Chris Lattner 3e39fa365d add a comment about something that was surprising, at least to me.
llvm-svn: 52771
2008-06-26 06:39:41 +00:00
Chris Lattner 2239b7d3d2 rename some attr tests for consistency.
llvm-svn: 52770
2008-06-26 06:32:02 +00:00
Chris Lattner 4b413ea3bf fix a bug handling type attributes in the declspec. declspec processing
used to mutate the attribute list for declspecs when the type was 
converted, breaking the case where one declspec was shared by multiple
declarators.

This fixes rdar://6032532.

llvm-svn: 52769
2008-06-26 06:27:57 +00:00
Chris Lattner dd7c10227b another const correctness bug with declspec.
llvm-svn: 52768
2008-06-26 06:11:04 +00:00
Chris Lattner c8846a19d4 fix const correctness of accessor.
llvm-svn: 52767
2008-06-26 06:07:52 +00:00
Chris Lattner bf231a61fd refactor more objc codegen interfaces to pass around selectors so
we don't push strings into LLVM IR and then have to read them back out.

llvm-svn: 52765
2008-06-26 05:08:00 +00:00
Chris Lattner 882034dd99 indenting and other minor things.
llvm-svn: 52764
2008-06-26 04:52:29 +00:00
Chris Lattner da35bc8e53 refactor interface to GenerateClassStructure to avoid converting a
string to LLVM IR and then regenerating the string from IR.

llvm-svn: 52762
2008-06-26 04:47:04 +00:00
Chris Lattner d9b98863c4 remove the old getSelector implementation, which removes some
calls to getStringValue

llvm-svn: 52761
2008-06-26 04:44:19 +00:00
Chris Lattner 6cfec78e48 avoid a lot of unneeded selector processing work by passing around
selectors instead of Value*'s.

llvm-svn: 52760
2008-06-26 04:42:20 +00:00
Chris Lattner 9a05d04a0d use cheaper/simpler getselector call for @selector exprs.
llvm-svn: 52759
2008-06-26 04:38:58 +00:00
Chris Lattner 6d522c0133 start avoid doing lots of unneeded work handling selectors
llvm-svn: 52758
2008-06-26 04:37:12 +00:00
Chris Lattner 42587147d4 improve indentation, avoid thrashing on maps and recalculating strings as much.
llvm-svn: 52757
2008-06-26 04:24:57 +00:00
Chris Lattner 87ab27d42f give CreateObjCRuntime a full CGM so it can get whatever state it needs,
instead of passing in just a couple random things it currently 
happens to use.

llvm-svn: 52756
2008-06-26 04:19:03 +00:00
Chris Lattner 63dd337fc2 Fix 80 col violations, assert on assumptions.
llvm-svn: 52755
2008-06-26 04:10:42 +00:00
Chris Lattner 64d8d074a8 fix this testcase after Mon Ping's intrinsic rename.
llvm-svn: 52754
2008-06-26 04:06:27 +00:00
Chris Lattner d46944d639 a temporary minimal hack to get clang building after the getStringValue changes in llvm mainline.
llvm-svn: 52753
2008-06-26 04:05:20 +00:00
Ted Kremenek f7b72b6940 Updated latest checker build to checker-45.
llvm-svn: 52746
2008-06-26 00:04:08 +00:00
Ted Kremenek 3185c9c9cd CF ref checker:
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
2008-06-25 21:21:56 +00:00
Ted Kremenek 0654d156b0 Add Profile method to QualType.
llvm-svn: 52735
2008-06-25 17:24:26 +00:00
Ted Kremenek c5d1e443ed Update VS project files.
llvm-svn: 52732
2008-06-25 17:14:52 +00:00
Ted Kremenek c9d1f45210 Update Xcode project.
llvm-svn: 52720
2008-06-25 15:15:35 +00:00
Argyrios Kyrtzidis 8a73d1f327 The assert at Sema::ObjCActOnStartOfMethodDef should check CurMethodDecl instead of CurFunctionDecl.
llvm-svn: 52719
2008-06-25 14:24:09 +00:00
Argyrios Kyrtzidis 90ba8b6de2 Set CXXClassVar to identifier namespace IDNS_Ordinary.
llvm-svn: 52718
2008-06-25 14:04:17 +00:00
Mon P Wang 28898b2888 Updated atomic intrinsic name from llvm r52706. Fixed dropped bit in shufps.
llvm-svn: 52707
2008-06-25 08:21:36 +00:00
Argyrios Kyrtzidis ac1b916441 'Educate' IdentifierResolver about the declaration context of CXXFieldDecls.
llvm-svn: 52698
2008-06-24 23:08:34 +00:00
Argyrios Kyrtzidis 1492538fd1 Set CXXMethod to identifier namespace IDNS_Ordinary.
llvm-svn: 52697
2008-06-24 22:56:42 +00:00
Argyrios Kyrtzidis a781452193 The only caller of this knows that the current token is l_brace, so this can be an assert; suggestion by Chris.
llvm-svn: 52696
2008-06-24 22:31:41 +00:00
Argyrios Kyrtzidis 7bbb20e338 Add parsing support for C++ classes.
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
2008-06-24 22:12:16 +00:00
Chris Lattner b1d329da07 "Support for Objective-C message sends which return structures. Also 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
2008-06-24 17:04:18 +00:00
Chris Lattner 6447ed3a1f "This is a small fix for a bug where static object instances were being 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
2008-06-24 17:01:28 +00:00
Ted Kremenek 17ae57faa8 Update serialization for ObjCMessageExpr to handle additional bit-swizziling of receiver information.
llvm-svn: 52679
2008-06-24 17:00:08 +00:00
Ted Kremenek a3a37ae8c8 ObjCMessageExpr objects that represent messages to class methods now can 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
2008-06-24 15:50:53 +00:00
Argyrios Kyrtzidis f159b71bdf Move the namespace action declarations at the "C++ declarations" section.
llvm-svn: 52673
2008-06-24 11:23:36 +00:00
Cedric Venet 4bcc95de9b Test commit: changed the forward declaration of FieldDeclarator from class to struct to be coherent with its definition (DeclSpec.h)
llvm-svn: 52671
2008-06-24 09:09:38 +00:00
Ted Kremenek f8e0bbd6ad Fix comments: "class method" should be "instance method" and vis versa
llvm-svn: 52669
2008-06-24 04:44:10 +00:00
Ted Kremenek f890bfe0ff Remove unneeded method arguments.
llvm-svn: 52668
2008-06-24 03:56:45 +00:00
Ted Kremenek b1d1329ac7 Cache ObjC summaries by IdentifierInfo*, not by ObjCInterfaceDecl.
llvm-svn: 52667
2008-06-24 03:49:48 +00:00
Ted Kremenek 675a6e6dfa Patch by Anders Bergh:
'There's not much to say about this patch, it just adds the Arch Linux
gcc 4.3.1 header paths for i686 and amd64. The patch was generated
using "svn diff" with clang at revision 52660. The paths aren't
distribution-specific, so they should work for all Linux distributions
using the default(?) names like "i686-pc-linux-gnu".'

llvm-svn: 52665
2008-06-24 03:33:47 +00:00
Ted Kremenek 0cfc16100b Added ObjCSummaryCache, a new summary cache object to cache summaries for 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
2008-06-23 23:30:29 +00:00
Ted Kremenek ea736c5d02 Rename summary methods for "instance methods" to "class methods" (the names got screwed up). No functionality change.
llvm-svn: 52650
2008-06-23 22:21:20 +00:00
Ted Kremenek 4c9e587db0 Updated latest checker build to checker-44.
llvm-svn: 52635
2008-06-23 18:32:25 +00:00
Ted Kremenek ab4a8b5213 The CF retain/release checker now assumes that allocations do not fail. Eventually we will add a flag to the driver to enable allocation failures (documented as a FIXME).
llvm-svn: 52632
2008-06-23 18:02:52 +00:00
Ted Kremenek 75c93eed9a Update VS project files. Patch by Cedric Venet!
llvm-svn: 52625
2008-06-23 16:18:59 +00:00
Chris Lattner 8a6274d745 add a new clang::APValue class at Eli's request. It is a discriminated
union between [potentially complex] APInt/APFloat.

llvm-svn: 52609
2008-06-22 05:45:53 +00:00
Chris Lattner 7fa2758b45 add a fixme back
llvm-svn: 52607
2008-06-21 22:44:51 +00:00