summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Although we currently have explicit lvalue-to-rvalue conversions, they'reJohn McCall2010-12-041-5/+13
| | | | | | | | | | | | | | | | | | | not actually frequently used, because ImpCastExprToType only creates a node if the types differ. So explicitly create an ICE in the lvalue-to-rvalue conversion code in DefaultFunctionArrayLvalueConversion() as well as several other new places, and consistently deal with the consequences throughout the compiler. In addition, introduce a new cast kind for loading an ObjCProperty l-value, and make sure we emit those nodes whenever an ObjCProperty l-value appears that's not on the LHS of an assignment operator. This breaks a couple of rewriter tests, which I've x-failed until future development occurs on the rewriter. Ted Kremenek kindly contributed the analyzer workarounds in this patch. llvm-svn: 120890
* Kill the KVC l-value kind and calculate the base expression when emittingJohn McCall2010-12-041-5/+3
| | | | | | the l-value. llvm-svn: 120884
* Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ↵John McCall2010-12-021-4/+0
| | | | | | | | ObjCPropertyRefExpr into the latter. llvm-svn: 120643
* Restore the lvalue-to-rvalue conversion patch with a minimal fix.John McCall2010-12-011-0/+4
| | | | llvm-svn: 120555
* L-value to r-value conversion is not ready for prime-time.John McCall2010-11-301-4/+0
| | | | llvm-svn: 120433
* Introduce an r-value to l-value cast kind. I'm not promising anythingJohn McCall2010-11-301-0/+4
| | | | | | about the reliability of this yet. llvm-svn: 120422
* Switch a lot of call-sites over to using the new value-kind calculations.John McCall2010-11-241-3/+3
| | | | llvm-svn: 120084
* comparison of AltiVec vectors now gives bool result (fix for 7533)Anton Yartsev2010-11-181-0/+108
| | | | llvm-svn: 119678
* Simplify some complex emission and implement correct semantics forJohn McCall2010-11-161-11/+35
| | | | | | | | | assignment to volatiles in C. This in effect reverts some of mjs's work in and around r72572. Basically, the C++ standard is quite clear, except that it lies about volatile behavior approximating C's, whereas the C standard is almost actively misleading. llvm-svn: 119344
* Now that we have reliable cast kinds, simplify scalar cast IR gen.John McCall2010-11-161-36/+3
| | | | llvm-svn: 119332
* Kill CK_Unknown and flesh out the documentation for the existing CastKinds.John McCall2010-11-161-5/+0
| | | | llvm-svn: 119331
* Assorted work leading towards the elimination of CK_Unknown.John McCall2010-11-151-24/+52
| | | | llvm-svn: 119138
* Add a few more complex-related cast kinds that arise due to arbitraryJohn McCall2010-11-141-2/+19
| | | | | | | | | | implicit conversions; the last batch was specific to promotions. I think this is the full set we need. I do think dividing the cast kinds into floating and integral is probably a good idea. Annotate a *lot* more C casts with useful cast kinds. llvm-svn: 119036
* Introduce five new cast kinds for various conversions into andJohn McCall2010-11-131-1/+5
| | | | | | between complex types. llvm-svn: 118994
* Introduce a null-to-pointer implicit cast kind.John McCall2010-11-131-3/+15
| | | | llvm-svn: 118966
* Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a ↵Anders Carlsson2010-10-311-1/+1
| | | | | | getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset. llvm-svn: 117881
* More class anonymization.Benjamin Kramer2010-10-221-1/+1
| | | | llvm-svn: 117106
* Permit constant evaluation of const floating-point variables withJohn McCall2010-10-091-11/+22
| | | | | | constant initializers. llvm-svn: 116138
* Tighter check in r116060 blcoked enums also. Emit enum const's debug info.Devang Patel2010-10-081-3/+3
| | | | llvm-svn: 116071
* Do not repeat debug info for file variable constants.Devang Patel2010-10-081-1/+5
| | | | | | This is tested by file-statics.exp in gdb testsuite. llvm-svn: 116060
* dyn_cast is more appropriate here.Devang Patel2010-10-041-1/+1
| | | | llvm-svn: 115569
* Add missing '}' :)Devang Patel2010-10-041-0/+1
| | | | llvm-svn: 115568
* Emit debug info for an aggregate while processing MemberExpr if the ↵Devang Patel2010-10-041-0/+12
| | | | | | aggregate's debug info was delayed untill now. llvm-svn: 115564
* Patch implements passing arrays to functions expectingFariborz Jahanian2010-09-241-11/+2
| | | | | | vla. Implements pr7827. llvm-svn: 114737
* Fixes an IRgen ICE due to cast of null pointer toFariborz Jahanian2010-09-211-2/+11
| | | | | | a vla type (fixes pr7827). llvm-svn: 114495
* Check in support for OpenCL conditional operator on vector types.Nate Begeman2010-09-201-0/+45
| | | | llvm-svn: 114371
* Add a -ftrapv-handler= option which allows a handler to invoke instead of ↵David Chisnall2010-09-171-5/+43
| | | | | | simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit. llvm-svn: 114192
* Patch to add IRgen support for Gnu's conditional operatorFariborz Jahanian2010-09-171-16/+20
| | | | | | | | extension when missing LHS. This patch covers scalar conditionals only. Others are wip. (pr7726, radar 8353567). llvm-svn: 114182
* one piece of code is responsible for the lifetime of every aggregateJohn McCall2010-09-151-2/+2
| | | | | | | | | | | | | slot. The easiest way to do that was to bundle up the information we care about for aggregate slots into a new structure which demands that its creators at least consider the question. I could probably be convinced that the ObjC 'needs GC' bit should be rolled into this structure. Implement generalized copy elision. The main obstacle here is that IR-generation must be much more careful about making sure that exactly llvm-svn: 113962
* Eagerly evaluate type traits in Sema instead of lazily in AST. They actually ↵Sebastian Redl2010-09-131-2/+1
| | | | | | need Sema access to be correct, fixes coming up. llvm-svn: 113782
* Augment -ftrapv to check for divide by zero, mod by zero, and INT_MIN % -1.Chris Lattner2010-09-111-4/+65
| | | | | | Patch by John Regehr! llvm-svn: 113705
* Implement CXXNoexceptExpr codegen.Sebastian Redl2010-09-101-0/+4
| | | | llvm-svn: 113629
* Casting of a property reference to 'void' did notFariborz Jahanian2010-09-041-2/+7
| | | | | | | generate the necessary code. This patch fixes it. // rdar://8389655 llvm-svn: 113079
* Truncate block variable of bool type to i1 when itsFariborz Jahanian2010-09-031-1/+1
| | | | | | | value is used. This matches with non-block variable use of bool type. (Fixes radar 8390062). llvm-svn: 113027
* IRgen: Fix silly thinko in r112021, which was generating code for the same exprDaniel Dunbar2010-09-031-1/+1
| | | | | | | twice. This showed up as an assert on the odd test case because we generated the decl map entry twice. llvm-svn: 112943
* Teach IR generation to return 'this' from constructors and destructorsJohn McCall2010-08-311-0/+1
| | | | | | under the ARM ABI. llvm-svn: 112588
* Revert my user-defined literal commits - r1124{58,60,67} pendingAlexis Hunt2010-08-301-3/+0
| | | | | | some issues being sorted out. llvm-svn: 112493
* Two minor fixes to user-defined literals:Alexis Hunt2010-08-301-0/+3
| | | | | | | - Zero-initialize UDLData so that crashes stop - Stop complaining that we can't emit them (we most certainly can) llvm-svn: 112467
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-66/+66
| | | | | | to the new constants. llvm-svn: 112047
* More incremental progress towards not including Expr.h in Sema.h.John McCall2010-08-251-1/+1
| | | | llvm-svn: 112044
* IRgen: Fix a horrible bug in pointer to bool conversion, which we were treatingDaniel Dunbar2010-08-251-2/+7
| | | | | | as a truncation not a comparison to null. llvm-svn: 112021
* Emit an error noting that Clang does not support code generation forDouglas Gregor2010-08-231-1/+6
| | | | | | | the ternary operator without a left-hand side in C++ (PR7726), from Jean-Daniel Dupas! llvm-svn: 111809
* Abstract out everything having to do with member pointers into the ABIJohn McCall2010-08-231-52/+21
| | | | | | | | | | | class; they should just be completely opaque throughout IR gen now, although I haven't really audited that. Fix a bug apparently inherited from gcc-4.2 where we failed to null-check member data pointers when performing derived-to-base or base-to-derived conversions on them. llvm-svn: 111789
* Eliminate a stale assertion. Fixes Clang self-host.Douglas Gregor2010-08-221-4/+1
| | | | llvm-svn: 111782
* Experiment with using first-class aggregates to represent member functionJohn McCall2010-08-221-3/+26
| | | | | | | | | | pointers. I find the resulting code to be substantially cleaner, and it makes it very easy to use the same APIs for data member pointers (which I have conscientiously avoided here), and it avoids a plethora of potential inefficiencies due to excessive memory copying, but we'll have to see if it actually works. llvm-svn: 111776
* Extract member function pointer comparison and null comparison intoJohn McCall2010-08-221-24/+5
| | | | | | | | | | | | the ABI code. Implement correct semantics for these on ARM. I believe this completes the implementation of member function pointers on ARM. I think I'm going to switch member function pointers over to be non-aggregates while I have all this in mind. llvm-svn: 111774
* IRgen: Switch a bunch of trivial MakeAddr calls to use MakeAddrLValue.Daniel Dunbar2010-08-211-14/+10
| | | | llvm-svn: 111716
* Zap unused UnaryOperator::OffsetOf.Eli Friedman2010-08-131-7/+0
| | | | llvm-svn: 110996
* Simplify code and add comments, in code that generate debug info for ↵Devang Patel2010-08-101-2/+4
| | | | | | constant integer globals, based on Chris's feedback. llvm-svn: 110694
* Even if a constant's evaluated value is used, emit debug info for the ↵Devang Patel2010-08-101-0/+1
| | | | | | constant variable. llvm-svn: 110660
OpenPOWER on IntegriCloud