Commit Graph

58532 Commits

Author SHA1 Message Date
Sanjiv Gupta 77abea0d6a Fixed spaces and the getelementpointer example with i16 type indices.
llvm-svn: 69971
2009-04-24 16:38:13 +00:00
Fariborz Jahanian a123b64218 Some code clean up of objc2's bitmap layout.
llvm-svn: 69970
2009-04-24 16:17:09 +00:00
Steve Naroff 54b6db1763 Allow the next catoregory slot to be null.
llvm-svn: 69969
2009-04-24 16:08:42 +00:00
Rafael Espindola c1396a2313 Fix PR 4004 by including the call to __tls_get_addr in X86tlsaddr. This is not
very elegant, but neither is the tls specification :-(

llvm-svn: 69968
2009-04-24 12:59:40 +00:00
Rafael Espindola b93db668b3 Revert 69952. Causes testsuite failures on linux x86-64.
llvm-svn: 69967
2009-04-24 12:40:33 +00:00
Chris Lattner 40493eb6eb fix rdar://6816766 - Crash with function-like macro test at end of directive.
llvm-svn: 69964
2009-04-24 07:15:46 +00:00
Chris Lattner 469fdc6af3 simplification and speedup
llvm-svn: 69963
2009-04-24 07:15:22 +00:00
Chris Lattner cb2147e58c fix a typo noticed by duncan
llvm-svn: 69962
2009-04-24 06:37:12 +00:00
Anders Carlsson 643e0a40db Fix assert.
llvm-svn: 69961
2009-04-24 06:06:07 +00:00
Anders Carlsson b17a2c3d8f CXXTempVarDecls aren't looked up. Fixes tests.
llvm-svn: 69960
2009-04-24 06:02:55 +00:00
Anders Carlsson a861067029 Add an ASTContext parameter to CXXTemporaryObjectExpr.
llvm-svn: 69959
2009-04-24 05:44:25 +00:00
Chris Lattner a776fc78a9 "I got annoyed at the compiler warnings from ConstantInt::get(Ty, -1,
true), and casts make me nervous and are verbose anyway, so here's a
ConstantInt::getSigned(Ty, int64_t) method. Just overloading
ConstantInt::get() to take an int64_t too would cause ambiguous
overload errors."

Patch by Jeffrey Yasskin!

llvm-svn: 69958
2009-04-24 05:30:14 +00:00
Anders Carlsson 56c5bd8d23 Add a VarDecl parameter to the CXXTemporaryObjectExpr constructor. It's unused for now, so no functionality change yet. Also, create CXXTempVarDecls to pass to the CXXTemporaryObjectExpr ctor.
llvm-svn: 69957
2009-04-24 05:23:13 +00:00
Anders Carlsson e500faf8c8 Create a CXXConstructExpr instead of a CXXTemporaryObjectExpr in InitializeVarWithConstructor.
llvm-svn: 69956
2009-04-24 05:16:06 +00:00
Douglas Gregor 1011c9a827 Make sure that ObjCCompatibleAlias and ObjCImplementation decls are considered NamedDecls
llvm-svn: 69955
2009-04-24 05:15:35 +00:00
Anders Carlsson 32ebd29b99 Make the CXXConstructExpr public and add a StmtClass to it. No functionality change.
llvm-svn: 69954
2009-04-24 05:04:04 +00:00
Anders Carlsson c5e0337eb2 Move the CXXConstructExpr before the CXXTemporaryObjectExpr so that the temporary object expr can inherit from the construct expr. No functionality change.
llvm-svn: 69953
2009-04-24 04:57:02 +00:00
Nate Begeman bb881d66f4 PR2957
ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
as the shuffle mask.  A value of -1 represents UNDEF.

In addition to eliminating the creation of illegal BUILD_VECTORS just to 
represent shuffle masks, we are better about canonicalizing the shuffle mask,
resulting in substantially better code for some classes of shuffles.

A clean up of x86 shuffle code, and some canonicalizing in DAGCombiner is next.

llvm-svn: 69952
2009-04-24 03:42:54 +00:00
Daniel Dunbar c1b1b4b2c9 Don't run dsymutil when making a fat executable direct source.
- Otherwise, we will end up with stray .dSYM files which don't get
   lipo'ed or removed.

 - Ideally we would run dsymutil on the result, but we don't have the
   infrastructure for that yet. Note that gcc doesn't handle this case
   either.

 - <rdar://problem/6809621> [driver] clang leaves .dSYM files lying
   around in tmp.

llvm-svn: 69951
2009-04-24 03:03:52 +00:00
Douglas Gregor 38feed810f Eliminate Sema::ObjCAliasDecls. This is based on Steve's fix, but also
updates name lookup so that we see through @compatibility_alias
declarations to their underlying interfaces.

llvm-svn: 69950
2009-04-24 02:57:34 +00:00
Sanjiv Gupta 4742515771 Clang part of r69947. Reverting back 69574 as it is no longer needed.
llvm-svn: 69949
2009-04-24 02:40:57 +00:00
Dan Gohman 640a161c73 Instead of requiring TLI.LowerCallTo to return an ISD::BUILD_PAIR,
use ISD::EXTRACT_ELEMENT. SelectionDAG has a special fast-path for
the cast of an EXTRACT_ELEMENT with a BUILD_PAIR operand, for the
common case.

llvm-svn: 69948
2009-04-24 02:40:23 +00:00
Daniel Dunbar 449354c761 Add a test case for a somewhat obscure scenario.
llvm-svn: 69947
2009-04-24 02:38:10 +00:00
Sanjiv Gupta 46c97e626f Allow i16 type indices to gep.
llvm-svn: 69946
2009-04-24 02:37:54 +00:00
Douglas Gregor ac3531247f Fix Objective-C crashes
llvm-svn: 69945
2009-04-24 02:15:36 +00:00
Daniel Dunbar a2666fefd8 We don't accept this test anymore in a non-fragile ABI.
llvm-svn: 69944
2009-04-24 02:11:35 +00:00
Chris Lattner 62975a788e Fix rdar://6821047 - clang crashes on subscript of interface in 64-bit mode
Several changes here:
1. We change Type::isIncompleteType to realize that forward declared 
   interfaces are incomplete.  This eliminate special case code for this
   from the sizeof path, and starts us rejecting P[4] when P is a pointer
   to an incomplete interface.
2. Explicitly reject P[4] when P points to an interface in non-fragile ABI
   mode.
3. Switch the sizeof(interface) diagnostic back to an error instead of a 
   warning in non-fragile abi mode.

llvm-svn: 69943
2009-04-24 00:30:45 +00:00
Douglas Gregor ac345a3990 Eliminate Sema::ObjCInterfaceDecls
llvm-svn: 69942
2009-04-24 00:16:12 +00:00
Douglas Gregor 79947a24e6 Eliminate Sema::ObjCImplementations, relying instead on name lookup. What's good for uniformity is good for PCH (or is it the other way around?).
As part of this, make ObjCImplDecl inherit from NamedDecl (since
ObjCImplementationDecls now need to have names so that they can be
found). This brings ObjCImplDecl very, very close to
ObjCContainerDecl; we may be able to merge them soon.

llvm-svn: 69941
2009-04-24 00:11:27 +00:00
Ted Kremenek 9099126795 Update checker build.
llvm-svn: 69940
2009-04-23 23:42:21 +00:00
Douglas Gregor de9f17e943 Eliminate Sema::ObjCProtocols. Instead, we place ObjCProtocolDecls in
their own namespace (IDNS_Protocol) and use the normal name-lookup
routines to find them. Aside from the simplification this provides
(one less DenseMap!), it means that protocols will be lazily
deserialized from PCH files.

Make the code size of the selector table block match the code size of
the type and decl blocks.

llvm-svn: 69939
2009-04-23 23:18:26 +00:00
Daniel Dunbar 838cbe19b7 Call ld, not collect2.
- <rdar://problem/6517382> [driver] call ld directly

llvm-svn: 69938
2009-04-23 23:17:23 +00:00
Dan Gohman 9478c3f8e5 Factor out a bit of code that appears in several places into a
utility function.

llvm-svn: 69937
2009-04-23 23:13:24 +00:00
Ted Kremenek 60746a0a83 Refactor common logic in getMethodSummary() and getClassMethodSummary(). No
functionality change.

llvm-svn: 69936
2009-04-23 23:08:22 +00:00
Dan Gohman a290ab44e8 Handle Void types in ComputeValueVTs. This doesn't currently occur,
but this change makes the code more general and easier to adapt for
new purposes.

llvm-svn: 69935
2009-04-23 22:50:03 +00:00
Dan Gohman 870c33f14b Fix spurious indentation in a comment.
llvm-svn: 69934
2009-04-23 22:41:05 +00:00
Douglas Gregor f6c2a27e16 PCH support for categories in Objective-C interfaces.
llvm-svn: 69933
2009-04-23 22:34:55 +00:00
Douglas Gregor 512b077803 PCH support for all of the predefined Objective-C types, such as id,
SEL, Class, Protocol, CFConstantString, and
__objcFastEnumerationState. With this, we can now run the Objective-C
methods and properties PCH tests.

llvm-svn: 69932
2009-04-23 22:29:11 +00:00
Ted Kremenek 37467813c5 Further cleanups to isTrackedObjectType().
llvm-svn: 69929
2009-04-23 22:11:07 +00:00
Fariborz Jahanian 6f0f25b0d8 Diagnose if an implementation implements a forward class
declaration (and avoid issuing bogus error later on).

llvm-svn: 69928
2009-04-23 21:49:04 +00:00
David Greene 0e89886048 Fix a documentation bug.
llvm-svn: 69923
2009-04-23 21:27:58 +00:00
Ted Kremenek 0a1f9c423f retain/release checker: Don't call isTrackedObject() with the canonical type.
This was preventing the checker from tracking return objects referenced by 'id'.

llvm-svn: 69922
2009-04-23 21:25:57 +00:00
David Greene 196ac3c69a Make BinOps typed and require a type specifier for !nameconcat. This
allows binops to be used in typed contexts such as when passing
arguments to classes.

llvm-svn: 69921
2009-04-23 21:25:15 +00:00
Evan Cheng 5bbb78dc3e Update comments.
llvm-svn: 69919
2009-04-23 20:39:31 +00:00
Evan Cheng 967b04d9bc Fix an obvious type.
llvm-svn: 69918
2009-04-23 20:18:13 +00:00
Ted Kremenek d6ed5b7376 Temporarily remove expected warnings.
llvm-svn: 69917
2009-04-23 20:03:52 +00:00
Ted Kremenek b2f419dc88 retain/release checker: For class methods, only treat return values that are
object references as tracked objects.

llvm-svn: 69915
2009-04-23 20:02:30 +00:00
Chris Lattner 310c921944 accept and ignore -Wconversion
llvm-svn: 69914
2009-04-23 19:54:39 +00:00
Dan Gohman 723f175bc9 Explicitly pass -tailcallopt=false to these tests so that they
work as intended no matter what the default setting of that
option is.

llvm-svn: 69911
2009-04-23 19:39:41 +00:00
Ted Kremenek f27110fc27 Per discussions with Ken Ferry and Paul Marks (<rdar://problem/6815234>) greatly
extend the number of objects tracked by the retain/release checker by assuming
that all class and instance methods should follow Cocoa object "getter" and
"alloc/new" conventions.

llvm-svn: 69908
2009-04-23 19:11:35 +00:00