summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Properly pass the address of a lazily-generated function declaration withJohn McCall2010-04-281-5/+16
| | | | | | incomplete type. Fixes PR6911. llvm-svn: 102473
* Fixed message send to void (broken by my last commit - GNU runtime).David Chisnall2010-04-271-1/+2
| | | | llvm-svn: 102459
* Ensure return from a message to nil is always 0 (GNU runtime).David Chisnall2010-04-271-1/+67
| | | | | | | | | This works around stack corruption / crashes resulting from PR6944, and also works around people who expect 'what works on my machine' to work everywhere (GCC crashes in a number of cases on SPARC that should now work correctly with clang). llvm-svn: 102430
* Fix comments.Daniel Dunbar2010-04-271-3/+3
| | | | llvm-svn: 102429
* Make the InjectedClassNameType the canonical type of the current instantiationJohn McCall2010-04-272-1/+7
| | | | | | | | | | | | | | | | of a class template or class template partial specialization. That is to say, in template <class T> class A { ... }; or template <class T> class B<const T*> { ... }; make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType when written inside the appropriate context. This allows us to track the current instantiation appropriately even inside AST routines. It also allows us to compute a DeclContext for a type much more efficiently, at some extra cost every time we write a template specialization (which can be optimized, but I've left it simple in this patch). llvm-svn: 102407
* Enable debug info for local variables at -O1+. Devang Patel2010-04-261-12/+1
| | | | llvm-svn: 102398
* emit dtors with the right calling convention in -fno-use-cxa-atexitChris Lattner2010-04-261-3/+8
| | | | | | mode. llvm-svn: 102377
* Make the static type of the exception variable in an Objective-CDouglas Gregor2010-04-262-7/+7
| | | | | | | @catch a VarDecl. The dynamic type is still a ParmVarDecl, but that will change soon. No effective functionality change. llvm-svn: 102341
* IRgen/NeXT: Fix several alignment issues with Objective-C metadata symbols:Daniel Dunbar2010-04-251-14/+15
| | | | | | | | | - Fix some places that had the alignment hard coded. - Use ABI type alignment, not preferred type alignment -- neither of this is exactly right, as we really want the C type alignment as required by the runtime, but the ABI alignment is a more correct choice. This should be equivalent for x86_64, but fixes the alignment for ARM. llvm-svn: 102314
* IRgen/NeXT: Reuse EmitImageInfo for both fragile and non-fragile ABI. This ↵Daniel Dunbar2010-04-251-32/+9
| | | | | | fixes Clang to correctly emit the "CorrectedSynthesize" bit when using the non-fragile ABI. llvm-svn: 102312
* Land another cleanup patch.Anders Carlsson2010-04-251-14/+8
| | | | llvm-svn: 102293
* Revert enough of my patches to fix self-host again :(Anders Carlsson2010-04-252-41/+83
| | | | llvm-svn: 102289
* Cleanup SynthesizeCXXCopyConstructor.Anders Carlsson2010-04-241-16/+9
| | | | llvm-svn: 102286
* Clean up SynthesizeCXXCopyAssignment a little.Anders Carlsson2010-04-241-15/+11
| | | | llvm-svn: 102285
* RenameGetAddressOfBaseOfCompleteClass to ↵Anders Carlsson2010-04-242-27/+28
| | | | | | GetAddressOfDirectBaseInCompleteClass to reflect that it only handles direct bases. llvm-svn: 102284
* More cleanup.Anders Carlsson2010-04-242-27/+18
| | | | llvm-svn: 102282
* Simplify EmitClassMemberwiseCopy now that it's only used for fields.Anders Carlsson2010-04-242-28/+14
| | | | llvm-svn: 102281
* DefineImplicitCopyConstructor now uses SetBaseOrMemberInitializers to create ↵Anders Carlsson2010-04-241-12/+0
| | | | | | implicit base initializers. (Member initializers are still handled by CodeGenFunction::SynthesizeCXXCopyConstructor for now). llvm-svn: 102279
* Rename GetAddressOfBaseClass to OldGetAddressOfBaseClass.Anders Carlsson2010-04-242-53/+15
| | | | llvm-svn: 102275
* Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to ↵Anders Carlsson2010-04-245-34/+5
| | | | | | use the new version. llvm-svn: 102274
* Change CodeGenFunction::GetAddressOfDerivedClass to take a BasePath.Anders Carlsson2010-04-245-23/+31
| | | | llvm-svn: 102273
* Convert more call sites over to the new GetAddressOfBaseClass.Anders Carlsson2010-04-242-11/+7
| | | | llvm-svn: 102272
* Add a new GetAddressOfBaseClass overload that takes a base path and. Use it ↵Anders Carlsson2010-04-243-10/+112
| | | | | | for derived-to-base casts. llvm-svn: 102270
* Fix pasto, add a comment.Benjamin Kramer2010-04-242-1/+2
| | | | llvm-svn: 102263
* Factor code. No functionality change.Benjamin Kramer2010-04-242-137/+38
| | | | llvm-svn: 102262
* NeXT: Clean up dispatch method policy selection.Daniel Dunbar2010-04-241-5/+12
| | | | | | | | | | - Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}. - Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp. - No intended functionality change. llvm-svn: 102255
* CastExpr should not hold a pointer to the base path. More cleanup.Anders Carlsson2010-04-241-1/+1
| | | | llvm-svn: 102249
* Fix a place in inline asm lowering which was creating a TruncInst with aDan Gohman2010-04-241-3/+8
| | | | | | | pointer operand. This fixes an abort on MultiSource/Applications/ClamAV/libclamav_mbox.c. llvm-svn: 102238
* Revert accidental check-in.Devang Patel2010-04-241-13/+5
| | | | llvm-svn: 102226
* Revert r102215. This causes clang crash while compiling a test case from gdb ↵Devang Patel2010-04-241-5/+13
| | | | | | testsuite. llvm-svn: 102224
* Improve the AST representation of Objective-C @try/@catch/@finallyDouglas Gregor2010-04-232-41/+43
| | | | | | | | | | statements. Instead of the @try having a single @catch, where all of the @catch's were chained (using an O(n^2) algorithm nonetheless), @try just holds an array of its @catch blocks. The resulting AST is slightly more compact (not important) and better represents the actual language semantics (good). llvm-svn: 102221
* More -fno-constant-cfstrings API work.Fariborz Jahanian2010-04-231-4/+9
| | | | llvm-svn: 102219
* Add an InheritancePath parameter to the ImplicitCastExpr constructor.Anders Carlsson2010-04-231-1/+1
| | | | llvm-svn: 102218
* NeXT/EH: When generating the rethrow code for a finally block, make sure toDaniel Dunbar2010-04-231-2/+12
| | | | | | | chain outwards when inside a nested exception scope. - A real test for this is going into LLVM test-suite. llvm-svn: 102204
* NeXT/EH: Tidy up EH code a bit, don't emit the catch block EH handler if it ↵Daniel Dunbar2010-04-231-27/+32
| | | | | | is unreachable. llvm-svn: 102203
* More work toward implementingFariborz Jahanian2010-04-232-2/+80
| | | | | | NeXt's -fno-constant-cfstrings - wip. llvm-svn: 102189
* Implement PR6845. We allow matching constraints to have differentChris Lattner2010-04-231-18/+23
| | | | | | | | input and output types when the smaller value isn't mentioned in the asm string. Extend this support from integers to also allowing fp values to be mismatched (if not mentioned in the asm string). llvm-svn: 102188
* Handle compound assignment expressions (i += j) as lvalues, which isDouglas Gregor2010-04-233-11/+82
| | | | | | | permitted in C++ but not in C. Fixes PR6900. Clang can now handle all of Boost.Lambda's regression tests. llvm-svn: 102170
* Emit a lame diagnostic when we can't mangle operator namesDouglas Gregor2010-04-231-1/+5
| | | | llvm-svn: 102168
* Mangle dependent template names such as the nested-name-specifier inDouglas Gregor2010-04-231-6/+53
| | | | | | | | | T::apply <U>::type Fixes PR6899, although I want to dig a little deeper into the FIXME for dependent template names that refer to operators. llvm-svn: 102167
* I hate default statements. Fixes PR6874.Douglas Gregor2010-04-231-4/+38
| | | | llvm-svn: 102160
* Support for -fno-constant-cfstrings option - wip.Fariborz Jahanian2010-04-223-1/+22
| | | | llvm-svn: 102112
* IRgen: Fix another case where we generated an invalid access component when weDaniel Dunbar2010-04-221-13/+12
| | | | | | | immediately narrowed the access size. Fix this (and previous case) by just choosing a better access size up-front. llvm-svn: 102068
* IRgen: Fix case where we might generate an access component with width == 0, ifDaniel Dunbar2010-04-221-0/+10
| | | | | | | we have to narrow the access side immediately (can happen with packed, -fno-bitfield-type-align). llvm-svn: 102067
* Suppress compiler warning.Daniel Dunbar2010-04-221-1/+1
| | | | llvm-svn: 102047
* IRgen: Set alignment correctly on bit-field accesses.Daniel Dunbar2010-04-221-4/+4
| | | | llvm-svn: 102046
* IRgen: Rewrite bit-field access policy to not access data beyond the bounds ↵Daniel Dunbar2010-04-221-39/+83
| | | | | | | | | | | | of the structure, which we also now verify as part of the post-layout consistency checks. - This fixes some pedantic bugs with packed structures, as well as major problems with -fno-bitfield-type-align. - Fixes PR5591, PR5567, and all known -fno-bitfield-type-align issues. - Review appreciated. llvm-svn: 102045
* IRgen: Fix CGRecordLayout::print to print the bit-field infos in a ↵Daniel Dunbar2010-04-221-1/+14
| | | | | | consistent order. llvm-svn: 102044
* Call PerformCopyInitialization to properly initialize the exception temporaryJohn McCall2010-04-224-87/+90
| | | | | | | | | in a throw expression. Use EmitAnyExprToMem to emit the throw expression, which magically elides the final copy-constructor call (which raises a new strict-compliance bug, but baby steps). Give __cxa_throw a destructor pointer if the exception type has a non-trivial destructor. llvm-svn: 102039
* Encode field accessibility.Devang Patel2010-04-211-1/+8
| | | | llvm-svn: 102033
OpenPOWER on IntegriCloud