Commit Graph

21682 Commits

Author SHA1 Message Date
Fariborz Jahanian 13d3f86577 objc++: some minor cleanup and a test case
for atomic setters which requires assignment operator.

llvm-svn: 141415
2011-10-07 21:08:14 +00:00
Anna Zaks 8de8cfdd21 ProgramPoint cleanup after the previous commit r141408 (remove the copy constructor, mark withTag const).
Move getProgramPoint() utility from CoreEngine.cpp into ProgramPoint.

llvm-svn: 141414
2011-10-07 21:01:38 +00:00
Douglas Gregor 6f981006f6 Add braces around do-while body. The lack of them gives me the chills
llvm-svn: 141411
2011-10-07 20:35:25 +00:00
Eli Friedman 1f19100451 Add address spaces for TCE target. Patch by Pekka Jääskeläinen.
llvm-svn: 141390
2011-10-07 19:51:42 +00:00
Chandler Carruth 08d0491006 Hack in a workaround for PR11082 until we have a proper fix. This
un-breaks every glib-dependent compile with Clang.

I'm not sure this is even the best workaround, so suggestions welcome.

llvm-svn: 141381
2011-10-07 18:40:27 +00:00
Bob Wilson 102be44843 Clang driver changes for iOS 5.0 and OS X Lion support.
Check whether the libc++ library is available when using -stdlib=libc++,
and also adjust the check for whether to link with -lgcc_s.1.
Patch by Ted Kremenek and Daniel Dunbar.

llvm-svn: 141374
2011-10-07 17:54:41 +00:00
Chad Rosier 9ac845149b More cleanup using StringSwitch.
llvm-svn: 141373
2011-10-07 17:48:56 +00:00
Fariborz Jahanian 942bbcea25 objc rewriter. Fix declaration of objc_msgSend_stret/objc_msgSendSuper_stret.
Fix an assert crash when casting a CF type to 'id'.
// rdar://10250911

llvm-svn: 141369
2011-10-07 17:17:45 +00:00
John McCall f937c023bf Rename TagDecl::isDefinition -> isCompleteDefinition
for better self-documenting code, since the semantics
are subtly different from getDefinition().

llvm-svn: 141355
2011-10-07 06:10:15 +00:00
John McCall 0710e551ef Record layout requires not just a definition, but a complete
definition.  Assert this.  Change IR generation to not try to
aggressively emit the IR translation of a record during its
own definition.  Fixes PR10912.

llvm-svn: 141350
2011-10-07 02:39:22 +00:00
Ted Kremenek f8fd4d4962 Fix infinite loop in -Wuninitialized reported in PR 11069.
llvm-svn: 141345
2011-10-07 00:42:48 +00:00
Bob Wilson 997a97f0f5 Use StringSwitch. Thanks for Chandler for the suggestion.
llvm-svn: 141344
2011-10-07 00:37:57 +00:00
Fariborz Jahanian 9cd57a7061 objc: Improve on diagnostic when atomic proeprty is synthesized
on one accessor and user-provide with another.

llvm-svn: 141343
2011-10-06 23:47:58 +00:00
John McCall 9776e438cf Move type-checking for C-style casts in C into the now-misnamed
SemaCXXCast.cpp.  Should have no functionality change.

llvm-svn: 141336
2011-10-06 23:25:11 +00:00
Argyrios Kyrtzidis c281c96675 Implicitly assume that a ObjC category to an unavailable interface is also unavailable;
only give an 'unavailable' error on the @implementation of the category. rdar://10234078

llvm-svn: 141335
2011-10-06 23:23:27 +00:00
Argyrios Kyrtzidis 9321ad3f97 When using an unavailable/deprecated interface Foo inside Foo's interface/implementation
don't emit unavailable errors.

llvm-svn: 141334
2011-10-06 23:23:20 +00:00
Eli Friedman c8b57f6683 llvm.memory.barrier is going away; remove the wrapper intrinsic __builtin_llvm_memory_barrier.
__atomic_thread_fence will be landing soon as a replacement, wrapping around the new fence instruction.

llvm-svn: 141332
2011-10-06 23:12:03 +00:00
Eli Friedman 0dfb889575 Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic.
Thanks to Jeffrey Yasskin for the thorough review!

llvm-svn: 141330
2011-10-06 23:00:33 +00:00
Benjamin Kramer 8c26d440da Use strpbrk(3) instead of open coding it.
llvm-svn: 141328
2011-10-06 22:53:35 +00:00
Bob Wilson bc9f7087b2 Remove DISABLE_ARM_DARWIN_USE_MOVT ifdefs. Radar 9456730.
llvm-svn: 141320
2011-10-06 21:52:27 +00:00
Ted Kremenek b7531d622d [static analyzer] Fix crash in LiveVariables and Environment::getSVal() when analyzing C++ pointer-to-member calls. Fixes <rdar://problem/10243398>.
llvm-svn: 141312
2011-10-06 20:53:28 +00:00
Eli Friedman 89c11337ba Add _mm_comige_sd to emmintrin.h, since I apparently forgot to do this in r138769.
<rdar://problem/10230751>

llvm-svn: 141310
2011-10-06 20:31:50 +00:00
Bob Wilson bd9d0e6d91 Rearrange for readability. No functional change.
llvm-svn: 141309
2011-10-06 20:27:40 +00:00
Bob Wilson d4d0237339 Add a missing check for cortex-a9.
llvm-svn: 141308
2011-10-06 20:27:38 +00:00
Peter Collingbourne fa4d6033a3 CUDA: IR generation support for device stubs
llvm-svn: 141304
2011-10-06 18:51:56 +00:00
Fariborz Jahanian 565ed7a4c1 objc++: For atomic properties of c++ class objec typet, appropriate
operator= is called. Issue a warning for non-trivial case until
runtime support is provided. // rdar://6137845

llvm-svn: 141302
2011-10-06 18:38:18 +00:00
Peter Collingbourne a9455ec9f8 CUDA: add -fcuda-is-device flag
This frontend-only flag is used by the IR generator to determine
whether to filter CUDA declarations for the host or for the device.

llvm-svn: 141301
2011-10-06 18:29:46 +00:00
Peter Collingbourne fe88342240 CUDA: IR generation support for kernel call expressions
llvm-svn: 141300
2011-10-06 18:29:37 +00:00
Peter Collingbourne 5bad4afa2f CUDA: set proper calling conventions for PTX
llvm-svn: 141296
2011-10-06 16:49:54 +00:00
Richard Smith 43a87fe86a PR11067: A definition of a constexpr static variable doesn't need an initializer if the in-class declaration had one. Such a declaration must be initialized by a constant expression.
llvm-svn: 141279
2011-10-06 09:21:12 +00:00
Erik Verbruggen 2e657ffd8e Added CXAvailability_NotAccessible to indicate that a declaration is available, but not accessible from the current code completion context.
llvm-svn: 141278
2011-10-06 07:27:49 +00:00
Ted Kremenek 540017e54e Use a sidetable in ASTContext for ParmVarDecls whose index exceeds the 8 bits reserved for that value in VarDecl. Fixes PR 10538.
llvm-svn: 141273
2011-10-06 05:00:56 +00:00
Peter Collingbourne 485b80fecc OpenCL: add a non-standard extension, cl_clang_storage_class_specifiers,
which enables support for C99 storage-class specifiers.

This extension is intended to be used by implementations to implement
OpenCL C built-in functions.

llvm-svn: 141271
2011-10-06 03:01:00 +00:00
Peter Collingbourne 6a0e48c746 OpenCL: disallow '#pragma OPENCL EXTENSION all : enable', per OpenCL 1.1 9.1
llvm-svn: 141270
2011-10-06 03:00:50 +00:00
Ivan Krasin 31f7411bfc Add -Wlanguage-extension-token option for ext_token_used warning.
llvm-svn: 141268
2011-10-06 02:46:34 +00:00
Peter Collingbourne d937a99465 Clang-side build system infrastructure for multiple tblgens.
llvm-svn: 141267
2011-10-06 01:52:10 +00:00
Anna Zaks 3e0f415d0d [analyzer] Remove the dependency on CheckerContext::getStmt() as well as the method itself.
llvm-svn: 141262
2011-10-06 00:43:15 +00:00
Eric Christopher fab289a47d When constructing debug information for synthesized variables for the
non-fragile ABI we may not be able to lay out the type and the debugger
would ignore us even if we did put in the offset. Go ahead and just
put any value there and don't look up the offset since it may not exist.

rdar://10210157

llvm-svn: 141261
2011-10-06 00:31:18 +00:00
Eric Christopher 8c552308c6 Reformat comment.
llvm-svn: 141260
2011-10-06 00:30:52 +00:00
Ted Kremenek f3e3f6645e Fix major regression in RetainCountChecker. DefaultSummaries were not being used when they were meant to be. Fixes <rdar://problem/10241614>.
llvm-svn: 141250
2011-10-05 23:54:29 +00:00
Anna Zaks c4aa22cdd4 [analyzer] Remove the last dependency on CheckerContext::getNodeBuilder() as well as the method itself.
Checkers should not directly access NodeBuilder, nodes can be created by calling the CheckerContext's generateNode() methods.

llvm-svn: 141249
2011-10-05 23:44:11 +00:00
Anna Zaks 77f8661d18 [analyzer] OSAtomicChecker implements evalCall in a very invasive way - it essentially simulates inlining of compareAndSwap() by means of setting the NodeBuilder flags and calling ExprEngine directly.
This commit introduces a new callback just for this checker to unblock checker API cleanup. 

llvm-svn: 141246
2011-10-05 23:37:30 +00:00
Argyrios Kyrtzidis a7324ede34 Fix crash when using archaic protocol, rdar://10238337
llvm-svn: 141215
2011-10-05 21:28:06 +00:00
Daniel Dunbar 096ed290a1 Driver & AST: Implement support for -fpack-struct and -fpack-struct= command
line options.
 - <rdar://problem/10120602>, PR9631

llvm-svn: 141211
2011-10-05 21:04:55 +00:00
Eli Friedman 533920650b Use APFloat::toString to print APFloats more precisely in the AST printer. Patch by Olaf Krzikalla.
llvm-svn: 141208
2011-10-05 20:32:03 +00:00
Chad Rosier 10746f5ebb [driver] For consistency, handle all shell special characters handled by the
quoting code.

llvm-svn: 141205
2011-10-05 20:09:11 +00:00
Chad Rosier 9b1311df26 [driver] The -v option doesn't quoted the command line arguments for historical
reasons.  However, it does seems practical to quote strings that need it.
rdar://10221951

llvm-svn: 141202
2011-10-05 19:51:41 +00:00
Argyrios Kyrtzidis 78181b4b45 Fix the rewriter, rdar://10234024.
llvm-svn: 141201
2011-10-05 19:37:56 +00:00
Justin Holewinski 38031978b5 PTX: Set proper calling conventions for PTX in OpenCL mode.
llvm-svn: 141193
2011-10-05 17:58:44 +00:00
Douglas Gregor a04a46e8f4 Seriously ugly hack, part 2
llvm-svn: 141181
2011-10-05 14:59:36 +00:00