summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash on C++ code when compiling with -finstrument-functions.Ted Kremenek2011-05-161-1/+1
| | | | llvm-svn: 131435
* Emit complete-object constructors for abstract classes in kext mode forJohn McCall2011-05-161-1/+2
| | | | | | reasons that honestly really, really need to be looked into. llvm-svn: 131434
* Implement the new C++0x rules for non-trivial things in unions so thatAlexis Hunt2011-05-162-17/+18
| | | | | | my defaulted constructor tests stop yelling at me about them. llvm-svn: 131432
* Pulls the common part of the clang-check example into Tooling, to allow new ↵Manuel Klimek2011-05-161-0/+81
| | | | | | tools to be implemented without duplicating the boilerplate. llvm-svn: 131425
* Make the triple an explicit argument of FindTargetProgramPath.Joerg Sonnenberger2011-05-165-21/+43
| | | | | | | | | | Preserve the original triple in the NetBSD toolchain when using -m32 or -m64 and the resulting effective target is different from the triple it started with. This allows -m32 to use the same assembler/linking in cross-compiling mode and avoids confusion about passing down target specific flags in that case like --32. llvm-svn: 131404
* Revert 131377, 131369 and 131365.Rafael Espindola2011-05-161-163/+23
| | | | | | 131365 caused PR9927. llvm-svn: 131401
* Fix another regression from the "skip vtable pointer initialization"Anders Carlsson2011-05-163-2/+4
| | | | | | | optimization. Make sure to require a vtable when trying to get the address of a VTT, otherwise we would never end up emitting the VTT. llvm-svn: 131400
* Don't actually emit calls to the reserved global placement new and deleteJohn McCall2011-05-161-28/+18
| | | | | | | | | operators; their semantics are guaranteed by the language. If someone wants to argue that freestanding compiles shouldn't recognize this, I might be convinceable. llvm-svn: 131395
* main() exists in hosted, not freestanding implementations. Fixes theAlexis Hunt2011-05-151-1/+1
| | | | | | build. llvm-svn: 131390
* Add a method for checking whether a function is one of the reserved globalJohn McCall2011-05-151-4/+28
| | | | | | | | placement allocation or deallocation functions. These functions cannot be replaced by the user and are exempt from the normal requirements on allocation functions (e.g. that they must return unaliased memory). llvm-svn: 131386
* Re-enable the fix for PR9181 now that all the edge cases are handled.Anders Carlsson2011-05-151-18/+70
| | | | llvm-svn: 131385
* When checking a set of template parameter lists against aDouglas Gregor2011-05-152-3/+8
| | | | | | | | | nested-name-specifier, re-evaluate the nested-name-specifier as if we were entering that context (which we did!), so that we'll resolve a template-id to a particular class template partial specialization. Fixes PR9913. llvm-svn: 131383
* The array-size operand to a new-expression is not necessarily a size_t.John McCall2011-05-152-142/+211
| | | | | | | It can be larger, it can be smaller, it can be signed, whatever. Handle all the crazy cases with grace and spirit. llvm-svn: 131378
* Fix MSVC build.Argyrios Kyrtzidis2011-05-151-1/+1
| | | | llvm-svn: 131377
* Make CGF.getContext() inlinable, because it's trivial, and optimizeJohn McCall2011-05-152-8/+36
| | | | | | hasAggregateLLVMType. llvm-svn: 131375
* More killing of std::vector.John McCall2011-05-152-40/+41
| | | | llvm-svn: 131374
* Use arrays and SmallVectors instead of std::vectors when building functionJohn McCall2011-05-155-193/+148
| | | | | | | types. Also, cache a translation of 'void' in CGM and provide a ptrdiff_t alias. No functionality change. llvm-svn: 131373
* Disable the optimization until the bug noticed by Sean Hunt has been fixed.Anders Carlsson2011-05-151-0/+4
| | | | llvm-svn: 131372
* Fix generation of obj-c @encoding for members with zero size.Argyrios Kyrtzidis2011-05-151-25/+33
| | | | | | Also follow gcc in that arrays of elements with zero size are encoded as arrays with zero elements. llvm-svn: 131369
* When emitting the destructor for a class with a vtable, if we can determineAnders Carlsson2011-05-143-13/+49
| | | | | | | | | | that the destructor body is trivial and that all member variables also have either trivial destructors or trivial destructor bodies, we don't need to initialize the vtable pointers since no virtual member functions will be called on the destructor. Fixes PR9181. llvm-svn: 131368
* Let clang-check actually use the Directory entry in the json file.Nico Weber2011-05-141-1/+1
| | | | llvm-svn: 131367
* Only perform the null-initialization of an aggregate result of a messageJohn McCall2011-05-141-16/+50
| | | | | | | | | send if the receiver is null. Normally it's not worthwhile to check this, but avoiding the null-initialization is nice, and this also avoids nasty problems where the null-initialization is visible within the call because we use an aliased result buffer. rdar://problem/9402992 llvm-svn: 131366
* Create proper Objective-C @encoding for C++ classes; fixes rdar://9357400.Argyrios Kyrtzidis2011-05-141-20/+152
| | | | | | | | | | | | | | | | | | Go through and expand the members of bases into the encoding string (and encode the VTable as well). Unlike gcc which expands virtual bases as many times as they appear in the hierarchy, clang will only expand them once at the end, to reflect the actual layout. Note that there doesn't seem to be a way to indicate in the encoding that packing/alignment of members is different that normal, in which case the encoding will be out-of-sync with the real layout. If the runtime switches to just consider the size of types without taking into account alignment, we could easily make padding explicit in the encoding (e.g. using arrays of chars). The encoding strings would be longer then though. Also encode a flexible array member as array of 0 size, like gcc, not as a pointer. llvm-svn: 131365
* Emit an error when trying to @encode an incomplete type.Argyrios Kyrtzidis2011-05-141-1/+7
| | | | | | | | There are APIs, e.g. [NSValue valueWithBytes:objCType:], which use the encoding to find out the size of an object pointed to by a pointer. Make things safer by making it illegal to @encode incomplete types. llvm-svn: 131364
* Revert 131347. It asserts if the specialization in within a class template:Francois Pichet2011-05-142-13/+6
| | | | | | | | | | | | template<class U> struct X1 { template<class T> void f(T*); template<> void f(int*) { } }; Won't be so simple. I need to think more about it. llvm-svn: 131362
* Make sure we actually generate defaulted copy constructors; caught byAlexis Hunt2011-05-141-1/+1
| | | | | | Howard Hinnant. Thanks! llvm-svn: 131349
* In Microsoft mode, allow template function explicit specialization at class ↵Francois Pichet2011-05-142-5/+12
| | | | | | | | | | | | | | scope. Necessary to parse MFC and MSVC standard lib code. Example: struct X { template<class T> void f(T) { } template<> void f(int) { } } llvm-svn: 131347
* PR9908: Fix the broken fix for PR9902 to get the template argument lists in ↵Richard Smith2011-05-142-9/+11
| | | | | | | | the right order. Also, don't reject alias templates in all ElaboratedTypes: some ElaboratedTypes do not correspond to elaborated-type-specifiers. llvm-svn: 131342
* What I hope to be an implementation of defaulted copy assignmentAlexis Hunt2011-05-142-60/+175
| | | | | | operators. llvm-svn: 131338
* More progress towards defaulted copy assignmentAlexis Hunt2011-05-141-1/+192
| | | | llvm-svn: 131337
* Start implementing defaulted copy assignmentAlexis Hunt2011-05-141-16/+24
| | | | llvm-svn: 131336
* Objective-C vtables are not taking the world by storm; call themJohn McCall2011-05-141-121/+139
| | | | | | | | | out as "v-table" message sends and stop calling normal messages "legacy" message sends. Also, fix some comments to reveal the true state of affairs. llvm-svn: 131335
* Reorganize this method to avoid multiple calls for computing CGFunctionInfoJohn McCall2011-05-131-77/+109
| | | | | | and to decrease the amount of effort in appending strings. llvm-svn: 131323
* SimplifyJoerg Sonnenberger2011-05-131-1/+1
| | | | llvm-svn: 131321
* Bug 8765: Honor assembler labels for builtins. Ensure that the label isJoerg Sonnenberger2011-05-131-4/+14
| | | | | | | mangled to avoid doing it twice for platforms that use prefixes like Darwin. llvm-svn: 131311
* Include assembler label for functions in the XML dumpJoerg Sonnenberger2011-05-131-0/+2
| | | | llvm-svn: 131310
* Fix copy constructor deletion detection with array types.Alexis Hunt2011-05-131-3/+10
| | | | | | This fixes PR9910 llvm-svn: 131309
* Introduce __has_extension macroPeter Collingbourne2011-05-131-6/+41
| | | | | | | | | | | | | | | __has_extension is a function-like macro which takes the same set of feature identifiers as __has_feature. It evaluates to 1 if the feature is supported by Clang in the current language (either as a language extension or a standard language feature) or 0 if not. At the same time, add support for the C1X feature identifiers c_generic_selections (renamed from generic_selections) and c_static_assert, and document them. Patch by myself and Jean-Daniel Dupas. llvm-svn: 131308
* Define __ARM_NEON__ in both ARM and Thumb modes. Radar 9431992.Bob Wilson2011-05-131-3/+3
| | | | llvm-svn: 131301
* Remove the 'unaligned load' builtins now that they're no longer used in the ↵Bill Wendling2011-05-131-13/+0
| | | | | | *mmintrin.h files. llvm-svn: 131300
* Produce UTF-8 strings with -fconstant-string-classFariborz Jahanian2011-05-131-21/+15
| | | | | | -fno-constant-cfstrings. Patch by Jonathan Schleifer. llvm-svn: 131298
* refactor CheckForwardProtocolDeclarationForCircularDependency returnsFariborz Jahanian2011-05-131-8/+11
| | | | | | 'true' on detecting protocol cycles. No functionality change. llvm-svn: 131297
* Defaulting copy constructors now works reasonably well.Alexis Hunt2011-05-132-39/+328
| | | | | | One more special member to go llvm-svn: 131287
* Refactoring of constant expression evaluatorPeter Collingbourne2011-05-133-340/+243
| | | | | | | | | This introduces a generic base class for the expression evaluator classes, which handles a few common expression types which were previously handled separately in each class. Also, the expression evaluator now uses ConstStmtVisitor. llvm-svn: 131281
* Add 'may_alias' attribute. Noticed by Eli.Bill Wendling2011-05-132-3/+3
| | | | llvm-svn: 131278
* When determining whether we can make a declaration into a globalDouglas Gregor2011-05-135-20/+19
| | | | | | | constant, also consider whether it's a class type that has any mutable fields. If so, it can't be a global constant. llvm-svn: 131276
* Teach the template parameter dependency checker used when matchingDouglas Gregor2011-05-131-0/+4
| | | | | | | | template parameter lists to scope specifiers for friend declarations about injected class name types. Fixes the g++.dg/template/memfriend5.C regression in the GCC testsuite. llvm-svn: 131272
* Implement the __is_trivially_copyable type traitAlexis Hunt2011-05-137-0/+42
| | | | llvm-svn: 131270
* Represent the unaligned loads natively. These are converted into a call to theBill Wendling2011-05-132-3/+12
| | | | | | correct unaligned load. llvm-svn: 131268
* Implement defaulting of destructors.Alexis Hunt2011-05-125-26/+59
| | | | llvm-svn: 131260
OpenPOWER on IntegriCloud