Commit Graph

17142 Commits

Author SHA1 Message Date
Abramo Bagnara 9e0e7096a3 Improved complex constants evaluation.
llvm-svn: 121616
2010-12-11 16:05:48 +00:00
Fariborz Jahanian c21f543bc4 Any property declared in a class extension might have user
declared setter or getter in current class extension or one
of the other class extensions. Mark them as synthesized as
property will be synthesized when property with same name is
seen in the @implementation. This prevents bogus warning
about unimplemented methods to be issued for these methods.
Fixes // rdar://8747333

llvm-svn: 121597
2010-12-10 23:36:33 +00:00
Bob Wilson 546b691c73 Add missing switch case for the quad-register version of the Neon vmul builtin.
llvm-svn: 121595
2010-12-10 23:09:09 +00:00
Bob Wilson 0348af667a Fix clang crashes on Neon vld[234]_dup intrinsics with 64-bit element types.
The 64-bit element vectors need to be handled as a special case.

llvm-svn: 121592
2010-12-10 22:54:58 +00:00
Argyrios Kyrtzidis 4d754a5502 Introduce ObjCMessageExpr::getReceiverRange() to get the source range of the receiver.
llvm-svn: 121517
2010-12-10 20:08:30 +00:00
Argyrios Kyrtzidis d0039e56f2 Keep the source location of the selector in ObjCMessageExpr.
llvm-svn: 121516
2010-12-10 20:08:27 +00:00
Bob Wilson a880fa0b28 Do not assert on shifts of Neon polynomial types.
Most Neon shift intrinsics do not have variants for polynomial types, but
vsri_n and vsli_n do support them, and we need to properly range-check the
shift immediates for them.

llvm-svn: 121509
2010-12-10 19:45:06 +00:00
Douglas Gregor 513e63c114 Silence a few more uninitialized-value warnings
llvm-svn: 121505
2010-12-10 19:28:19 +00:00
Peter Collingbourne 0168763e7d Do not substitute template types if template has dependent context
We should not substitute template types if the template has a dependent
context because the template argument stack is not yet fully formed.
Instead, defer substitution until the template has a non-dependent
context (i.e. instantiation of an outer template).

llvm-svn: 121491
2010-12-10 17:08:53 +00:00
Fariborz Jahanian 352d5e5362 Fix a compiler warning.
llvm-svn: 121490
2010-12-10 17:05:33 +00:00
Douglas Gregor 0cdc832077 Eliminate the branching in QualType::getTypePtr() by providing a
common base for ExtQuals and Type that stores the underlying type
pointer. This results in a 2% performance win for -emit-llvm on a
typical C file, with 1% memory growth in the AST.

Note that there is an API change in this optimization:
QualType::getTypePtr() can no longer be invoked on a NULL
QualType. If the QualType might be NULL, use
QualType::getTypePtrOrNull(). I've audited all uses of getTypePtr() in
the code base and changed the appropriate uses over to
getTypePtrOrNull(). 

A future optimization opportunity would be to distinguish between
cast/dyn_cast and cast_or_null/dyn_cast_or_null; for the former, we
could use getTypePtr() rather than getTypePtrOrNull(), to take another
branch out of the cast/dyn_cast implementation.

llvm-svn: 121489
2010-12-10 17:03:06 +00:00
Abramo Bagnara 924a8f3573 Added ParenType type node.
llvm-svn: 121488
2010-12-10 16:29:40 +00:00
John McCall 717d9b0e2f It's kindof silly that ExtQuals has an ASTContext&, and we can use that
space better.  Remove this reference.  To make that work, change some APIs
(most importantly, getDesugaredType()) to take an ASTContext& if they
need to return a QualType.  Simultaneously, diminish the need to return a
QualType by introducing some useful APIs on SplitQualType, which is
just a std::pair<const Type *, Qualifiers>.

llvm-svn: 121478
2010-12-10 11:01:00 +00:00
Douglas Gregor 643526f086 Move the "volatile" bit into QualType's "fast" qualifier set,
increasing the required type alignment from 8 to 16. This provides a
2.5% speedup for -fsyntax-only on a token-cached Cocoa.h, while only
increasing memory consumption in the ASTContext by 0.8%.

llvm-svn: 121474
2010-12-10 08:57:38 +00:00
Douglas Gregor 21c0fc18bf Use TypeAlignment constant rather than fixed alignment of 8
llvm-svn: 121473
2010-12-10 08:12:03 +00:00
Bob Wilson 4c4a00a10b Add missing switch case to handle builtin for Neon vqnegq.
llvm-svn: 121468
2010-12-10 06:26:19 +00:00
Bob Wilson d1767c5c15 LLVM's intrinsics for vpaddl and vpadal have 2 overloaded types.
Clang was only specifying the overloaded result type.  PR8483.

llvm-svn: 121464
2010-12-10 05:51:07 +00:00
John McCall 2faf32c4fd Treat visibility on an enclosing namespace as a non-explicit source of
visibility.  Fixes PR8713.

I've disabled a test which was testing that you can #pragma pop visibility
to get out of a namespace's visibility attribute.  We should probably just
diagnose that as an error unless it's instrumental to someone's system
headers.

llvm-svn: 121459
2010-12-10 02:59:44 +00:00
John McCall 4f26cd8101 Bind the result of a property fetch to a temporary.
llvm-svn: 121452
2010-12-10 01:49:45 +00:00
Bob Wilson 571c907cdf Neon compare absolute LLVM intrinsics are not overloaded. PR8484.
llvm-svn: 121447
2010-12-10 01:11:38 +00:00
Argyrios Kyrtzidis 648fcbef5b Fix another obscure corner layout case.
llvm-svn: 121436
2010-12-10 00:11:00 +00:00
Douglas Gregor 9c7bd2f535 Don't crash when code-completing after "#include <". It would be far
better to actually produce a decent set of completions by checking the
system include paths, but not today. Fixes PR8744.

llvm-svn: 121431
2010-12-09 23:35:36 +00:00
Fariborz Jahanian 31d6d84f27 Refactored/cleanedup ActOnFunctionDeclarator
and ActOnVariableDeclarator
No functionality change. // rdar://8751949

llvm-svn: 121427
2010-12-09 23:11:32 +00:00
Douglas Gregor b888acf413 Eliminate duplicate code completions for properties.
llvm-svn: 121424
2010-12-09 23:01:55 +00:00
Douglas Gregor a3b23b025b Don't walk the translation unit context to produce protocol names when
global code completions are disabled (e.g., because they are
cached). Also, make sure that forward-declared protocols are visited
when we look for all visible names within a declaration context.

Previously, we would end up with duplicate completions for protocols.

llvm-svn: 121416
2010-12-09 21:44:02 +00:00
Douglas Gregor aca48a5aff Gather cached code completions after the first reparse, not after the
second reparse.

llvm-svn: 121413
2010-12-09 21:27:43 +00:00
Michael J. Spencer f25faaaffb Use error_code instead of std::string* for MemoryBuffer.
llvm-svn: 121378
2010-12-09 17:36:38 +00:00
Douglas Gregor ff76cb9727 When an "inline" declaration was followed by a definition not marked
"inline", we weren't giving the definition weak linkage because the
"inline" bit wasn't propagated. This was a longstanding FIXME that,
somehow, hadn't triggered a bug in the wild. Fix this problem by
tracking whether any declaration was marked "inline", and clean up the
semantics of GNU's "extern inline" semantics calculation based on this
change.

Fixes <rdar://problem/8740363>.

llvm-svn: 121373
2010-12-09 16:59:22 +00:00
Francois Pichet dbafc19fe0 Fix PR8760: IndirectFieldDecl Type was not updated during template instantiation.
llvm-svn: 121363
2010-12-09 10:07:54 +00:00
Argyrios Kyrtzidis d62c9be4fc Fix another unnecessary-struct-padding issue.
llvm-svn: 121352
2010-12-09 02:47:58 +00:00
Argyrios Kyrtzidis 8b54274fcf Before determining the effect the alignment of base struct will have in the aligment of the sub-struct,
take into account if the sub-struct is packed and its maximum field alignment.

Fixes rdar://8745206

llvm-svn: 121335
2010-12-09 00:35:20 +00:00
Devang Patel 8c44529c85 Remove unused parameter. getContextDescriptor() and getOrCreateNameSpace().
llvm-svn: 121333
2010-12-09 00:33:05 +00:00
Devang Patel 4591f7736a Remove unused parameter.
llvm-svn: 121326
2010-12-09 00:25:29 +00:00
Douglas Gregor aed2efbbb5 A typename specifier can end up referring to a unresolved using
declaration that is a value in ill-formed code. Instead of crashing,
treat this as a dependent typename specifier and suggest that the
using add "typename" into the using declaration. Fixes <rdar://problem/8740998>.

llvm-svn: 121322
2010-12-09 00:06:27 +00:00
Devang Patel 00afcbe366 Start using DIBuilder. It provides cleaner interface.
llvm-svn: 121302
2010-12-08 22:42:58 +00:00
Bob Wilson 482afae812 Stop using builtins for the "_lane" variants of saturating multiply intrinsics.
Remove the "splat" parameter from the EmitNeonCall function, since it is no
longer needed.

llvm-svn: 121300
2010-12-08 22:37:56 +00:00
Francois Pichet 34b2113250 Remove the TypesCompatibleExprClass AST node. Merge its functionality into BinaryTypeTraitExpr.
llvm-svn: 121298
2010-12-08 22:35:30 +00:00
Bob Wilson b038120094 Stop using clang builtins for Neon vabdl and vabal intrinsics.
llvm-svn: 121288
2010-12-08 21:39:47 +00:00
Daniel Dunbar 86aed7d5fc Driver: M and MM should be grouped together, <rdar://problem/8744831>.
llvm-svn: 121284
2010-12-08 21:33:40 +00:00
Bob Wilson 7d66df9c33 Stop using clang builtins for Neon vaba intrinsics.
llvm-svn: 121277
2010-12-08 20:09:54 +00:00
Douglas Gregor 35fd7bc7e0 Fix two thinkos and add a test for importing the AST of a category
implementation.

llvm-svn: 121263
2010-12-08 16:41:55 +00:00
Argyrios Kyrtzidis ac3b3e8781 Handle parameter attributes when tentative parsing for function/variable disambiguation.
Fixes rdar://8739801.

llvm-svn: 121228
2010-12-08 02:02:46 +00:00
Chandler Carruth 8005adf031 Silence an unused variable warning.
llvm-svn: 121221
2010-12-08 01:29:17 +00:00
Bob Wilson 8811c3a72e Stop using clang builtins for Neon vadd[lw] and vsub[lw] intrinsics.
llvm-svn: 121214
2010-12-08 00:14:43 +00:00
Bob Wilson f81b09db68 Stop using clang builtins for Neon vmlal{_n,_lane} and vmlsl{_n,_lane}.
llvm-svn: 121210
2010-12-07 23:54:55 +00:00
John McCall ed75c09401 Bump up property conversion earlier in the initialization process. Fixes
the failed compile in PR8751.

llvm-svn: 121192
2010-12-07 22:54:16 +00:00
Bob Wilson 210f6ddecc Stop using a clang builtin for Neon vdup_lane intrinsics.
llvm-svn: 121191
2010-12-07 22:40:02 +00:00
Bob Wilson 7f3c0aa96f Stop using a clang builtin for Neon vmull_lane intrinsic.
llvm-svn: 121189
2010-12-07 22:03:46 +00:00
Bob Wilson 160fdf49e4 Add a missing parameter, without which clang crashes for vqshlu_n intrinsics.
llvm-svn: 121188
2010-12-07 22:03:43 +00:00
Douglas Gregor 14a49e2fbe Implement AST import for Objective-C property implementations
(@synthesize and @dynamic).

llvm-svn: 121159
2010-12-07 18:32:03 +00:00