summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprComplex.cpp
Commit message (Collapse)AuthorAgeFilesLines
* refactor pre/postinc logic into CGF and require the caller to pass in theChris Lattner2010-01-091-35/+4
| | | | | | lvalue to poke, no functionality change. llvm-svn: 93075
* Minor optimization; emit proper unsupported messages for a couple of cases.Eli Friedman2009-12-251-2/+9
| | | | llvm-svn: 92153
* Simplify code. No functionality change.Benjamin Kramer2009-11-291-22/+6
| | | | llvm-svn: 90087
* Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.Benjamin Kramer2009-11-281-2/+1
| | | | llvm-svn: 90044
* Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall2009-09-211-10/+10
| | | | | | | | | | | Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. llvm-svn: 82501
* Reflow comments and some minor whitespace fixups.Mike Stump2009-09-091-66/+65
| | | | llvm-svn: 81337
* Using "ObjCImplicitSetterGetterRefExpr" instead of ↵Fariborz Jahanian2009-08-201-2/+2
| | | | | | | | "ObjCImplctSetterGetterRefExpr". A field rename and more comments. llvm-svn: 79537
* Switch to SmallString::str from SmallString::c_str.Daniel Dunbar2009-08-191-4/+11
| | | | | | - Several FIXMEs due to non-Twinification of IRBuilder. llvm-svn: 79455
* Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.Fariborz Jahanian2009-08-181-1/+2
| | | | | | | | Removed an unnecessary loop to get to setters incoming argument. Added DoxyGen comments. Still more work to do in this area (WIP). llvm-svn: 79365
* Update for LLVM API change.Owen Anderson2009-07-311-5/+5
| | | | llvm-svn: 77722
* Canonicalize else spacing.Mike Stump2009-07-301-1/+0
| | | | llvm-svn: 77629
* Update for LLVM API change.Owen Anderson2009-07-271-3/+1
| | | | llvm-svn: 77249
* Switch to using llvm::Value::getName()Daniel Dunbar2009-07-261-2/+2
| | | | llvm-svn: 77147
* Update for LLVM API change.Owen Anderson2009-07-241-1/+1
| | | | llvm-svn: 77012
* Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson2009-07-141-2/+4
| | | | llvm-svn: 75705
* Update for LLVM API change.Owen Anderson2009-07-131-5/+8
| | | | llvm-svn: 75446
* Update clang for the add ->add/fadd split. Likewise for sub and mul.Chris Lattner2009-06-171-30/+87
| | | | llvm-svn: 73604
* Support complex properties, ivars and message expressions.Daniel Dunbar2009-06-101-6/+42
| | | | llvm-svn: 73158
* Implement VisitCXXExprWithTemporaries for complex expressions.Anders Carlsson2009-05-311-0/+3
| | | | llvm-svn: 72653
* Fixup the rest of the trivial cases of the codegen of volatile. IfMike Stump2009-05-291-22/+108
| | | | | | | any body can spot codegen bugs with volatile, or knows of any in the bug database, let me know. llvm-svn: 72572
* Functions that return references can be rvalues as well.Anders Carlsson2009-05-271-0/+3
| | | | llvm-svn: 72457
* Change compound assignment operators to keep track of both the promoted Eli Friedman2009-03-281-1/+1
| | | | | | | | | | | | | | | | | LHS type and the computation result type; this encodes information into the AST which is otherwise non-obvious. Fix Sema to always come up with the right answer for both of these types. Fix IRGen and the analyzer to account for these changes. This fixes PR2601. The approach is inspired by PR2601 comment 2. Note that this changes real *= complex in CodeGen from a silent miscompilation to an explicit error. I'm not really sure that the analyzer changes are correct, or how to test them... someone more familiar with the analyzer should check those changes. llvm-svn: 67889
* Some minor fixes for complex IRGen.Eli Friedman2009-03-231-23/+16
| | | | llvm-svn: 67501
* Minor cleanup for choose expressions: add a helper that returns the Eli Friedman2009-03-041-2/+1
| | | | | | chosen sub-expression, rather than just evaluating the condition. llvm-svn: 66018
* rip out __builtin_overloadChris Lattner2009-02-181-6/+0
| | | | llvm-svn: 64961
* Use EmitVAListRef instead of EmitLValue directly to handle array decayDaniel Dunbar2009-02-111-1/+1
| | | | | | case on x86_64. llvm-svn: 64333
* Support va_arg on _Complex.Daniel Dunbar2009-02-101-0/+18
| | | | | | | | | | | gcc compat test suite results (Darwin x86-32 & -64): -- # of expected passes 1110 # of unexpected failures 74 # of unresolved testcases 168 # of unsupported tests 2 llvm-svn: 64197
* Introduce a new expression node, ImplicitValueInitExpr, thatDouglas Gregor2009-01-291-0/+6
| | | | | | | | | | | | | represents an implicit value-initialization of a subobject of a particular type. This replaces the (ab)use of CXXZeroValueInitExpr within initializer lists for the "holes" that occur due to the use of C99 designated initializers. The new test case is currently XFAIL'd, because CodeGen's ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be taught to value-initialize when it sees ImplicitValueInitExprs. llvm-svn: 63317
* Fix typoDaniel Dunbar2009-01-291-1/+1
| | | | llvm-svn: 63281
* Comment fix.Daniel Dunbar2009-01-261-1/+1
| | | | llvm-svn: 63016
* Normalize many BasicBlock names.Daniel Dunbar2008-11-131-3/+3
| | | | | | | | | | - Use dotted notation for blocks related to a particular statement type. - Use .end for landing pads. No functionality change in NDEBUG mode. :) llvm-svn: 59210
* Rework IRgen invariant w.r.t. current insert point.Daniel Dunbar2008-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - EmitStmt is no longer required to finish with a current insertion point defined (i.e. it does not need to make dummy blocks). Instead, it can clear the insertion point in the builder which indicates that the current insertion point is unreachable. - CodeGenFunction provides HaveInsertPoint and EnsureInsertPoint which respectively test if there is an insert point and ensure an insertion point exists (by making a dummy block). - Clearly mark functions in CodeGenFunction which can be called with no insertion point defined. Currently this is a limited set, and EmitStmt simply EnsureInsertPoint()s before emitting subsequent IR. Remove EmitDummyBlock, which is no longer needed. Clients who haven't already cleared the insertion point (typically via EmitBranch) can do so by hand. Remove isDummyBlock, which has effectively been renamed to HaveInsertPoint. The main thrust of this change is that we no longer have create dummy blocks just to destroy them a short time later in EmitBlock in the common case that there is no unreachable code following something like a goto. Additionally, this means that we are not using the hokey condition in isDummyBlock that a block without a name is a dummy block. Guess how well that works when we never emit block names! llvm-svn: 59089
* Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof ↵Sebastian Redl2008-11-111-1/+1
| | | | | | expressions, both of values and types. llvm-svn: 59057
* Add CodeGenFunction::EmitBranch.Daniel Dunbar2008-11-111-2/+2
| | | | | | | - Emits an unconditional branch, with extra logic to avoid generating spurious branches out of dummy blocks. llvm-svn: 59037
* Centralize basic block creation in CodeGenFunction::createBasicBlock.Daniel Dunbar2008-11-111-3/+3
| | | | | | - No functionality change. llvm-svn: 59017
* Move IRBuilder type definition to common file.Daniel Dunbar2008-11-011-1/+1
| | | | | | - No functionality change. llvm-svn: 58546
* Add Objective-C property setter support.Daniel Dunbar2008-08-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | - Change Obj-C runtime message API, drop the ObjCMessageExpr arg in favor of just result type and selector. Necessary so it can be reused in situations where we don't want to cons up an ObjCMessageExpr. - Update aggregate binary assignment to know about special property ref lvalues. - Add CodeGenFunction::EmitCallArg overload which takes an already emitted rvalue. Add CodeGenFunction::StoreComplexIntoAddr. Disabled logic in Sema for parsing Objective-C dot-syntax that accesses methods. This code does not search in the correct order and the AST node has no way of properly representing its results. Updated StmtDumper to print a bit more information about ObjCPropertyRefExprs. llvm-svn: 55561
* Add CodeGen support for CXXZeroInitValueExpr.Argyrios Kyrtzidis2008-08-231-0/+6
| | | | llvm-svn: 55249
* Change WarnUnsupported to ErrorUnsupported (in name and in practice).Daniel Dunbar2008-08-161-1/+1
| | | | | | | - We are beyond the point where this shows up often and when it does generating miscompiled files is bad. llvm-svn: 54836
* More #include cleaningDaniel Dunbar2008-08-111-1/+2
| | | | | | - Remove internal uses of AST.h llvm-svn: 54628
* update to make IRBuilder API change.Chris Lattner2008-08-081-1/+1
| | | | llvm-svn: 54548
* remove uses of QualType::getCanonicalType() from codegen for PR2189Chris Lattner2008-07-261-5/+6
| | | | llvm-svn: 54107
* This patch is motivated by numerous strict-aliasing warnings when compilingTed Kremenek2008-06-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang as a Release build. The big change is that all AST nodes (subclasses of Stmt) whose children are Expr* store their children as Stmt* or arrays of Stmt*. This is to remove strict-aliasing warnings when using StmtIterator. None of the interfaces of any of the classes have changed (except those with arg_iterators, see below), as the accessor methods introduce the needed casts (via cast<>). While this extra casting may seem cumbersome, it actually adds some important sanity checks throughout the codebase, as clients using StmtIterator can potentially overwrite children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts provide extra sanity checks that are operational in debug builds to catch invariant violations such as these. For classes that have arg_iterators (e.g., CallExpr), the definition of arg_iterator has been replaced. Instead of it being Expr**, it is an actual class (called ExprIterator) that wraps a Stmt**, and provides the necessary operators for iteration. The nice thing about this class is that it also uses cast<> to type-checking, which introduces extra sanity checks throughout the codebase that are useful for debugging. A few of the CodeGen functions that use arg_iterator (especially from OverloadExpr) have been modified to take begin and end iterators instead of a base Expr** and the number of arguments. This matches more with the abstraction of iteration. This still needs to be cleaned up a little bit, as clients expect that ExprIterator is a RandomAccessIterator (which we may or may not wish to allow for efficiency of representation). This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c, which was already broken) on both a Debug and Release build, but it should obviously be reviewed. llvm-svn: 52378
* Add support for init lists for complex variables.Eli Friedman2008-05-131-0/+13
| | | | llvm-svn: 51080
* use simplified API for making fp constants.Chris Lattner2008-05-041-4/+2
| | | | llvm-svn: 50623
* update to follow mainline llvm API change.Chris Lattner2008-04-131-1/+1
| | | | llvm-svn: 49607
* Add support for C++ default arguments, and rework Parse-Sema Chris Lattner2008-04-081-0/+3
| | | | | | | | interaction for function parameters, fixing PR2046. Patch by Doug Gregor! llvm-svn: 49369
* tracking API changes arising from r49277Gabor Greif2008-04-061-3/+3
| | | | llvm-svn: 49279
* Since isComplexType() no longer returns true for _Complex integers, the codeChris Lattner2008-04-041-3/+3
| | | | | | generator needs to call isAnyComplexType(). This fixes PR1960. llvm-svn: 49220
* simplify the clang codegen by using the new Builder.CreateStructGEP method.Chris Lattner2008-03-191-15/+4
| | | | llvm-svn: 48534
OpenPOWER on IntegriCloud