summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Change ObjCRuntime GenerateProtocol[Ref] methods to takeDaniel Dunbar2008-08-131-1/+2
| | | | | | | | | | | ObjCProtocolDecl directly. Implement CodeGen support for forward protocol decls (no-ops are so nice to implement). Also moved CGObjCRuntime.h out of CodeGenModule.h llvm-svn: 54709
* Drop Sender from GenerateMessageSend*Daniel Dunbar2008-08-121-1/+0
| | | | | | | - Was unused and generated a unnecessary load of self (missed file) llvm-svn: 54668
* Protocol related tweaksDaniel Dunbar2008-08-121-0/+7
| | | | | | | - Implement type conversion of ObjCQualifiedIdType - Wire @protocol(...) to GenerateProtocolRef in ScalarExprEmitter llvm-svn: 54666
* Add @selector(...) codegen support.Daniel Dunbar2008-08-121-0/+5
| | | | llvm-svn: 54665
* Change CodeGenModule to only create ObjC runtime for ObjC filesDaniel Dunbar2008-08-111-1/+3
| | | | | | | - Changed CodeGenModule::getObjCRuntime to return reference. - Added CodeGenModule::hasObjCRuntime predicate. llvm-svn: 54645
* More #include cleaningDaniel Dunbar2008-08-111-1/+2
| | | | | | - Remove internal uses of AST.h llvm-svn: 54628
* rename PreDefinedExpr -> PredefinedExprChris Lattner2008-08-101-1/+1
| | | | llvm-svn: 54605
* update to make IRBuilder API change.Chris Lattner2008-08-081-1/+1
| | | | llvm-svn: 54548
* Fix CodeGen of pointer arithmetic in compound assignment statements.Daniel Dunbar2008-08-061-76/+94
| | | | | | | | | | | | | | | | | | | - Changed EmitSub to work on all cases (arithmetic, ptr - int, ptr - ptr) so that implementation matches that of other operators. - Modify EmitCompoundAssign to compute and perform the appropriate casts of left, right, and result types for the assorted pointer arithmetic cases. - Fix EmitSub (ptr - int) case to negate the rhs *after* extension. This is critical when the rhs is unsigned (and needs extension). - This fixes cfrac. - <rdr://6115726> llvm-svn: 54392
* Bug fix, CodeGen of (void*) - (void*) was broken.Daniel Dunbar2008-08-051-3/+12
| | | | | | - <rdar://problem/6122967> llvm-svn: 54338
* Add CodeGen support for indirect goto.Daniel Dunbar2008-08-041-0/+6
| | | | | | | | | | - Follows emission scheme used by llvm-gcc, i.e. invent an id for each label whose address is taken and replace each indirect goto by a switch to each possible target. - Currently we emit a switch for each indirect goto instead of merging them as llvm-gcc does. llvm-svn: 54318
* remove uses of QualType::getCanonicalType() from codegen for PR2189Chris Lattner2008-07-261-13/+8
| | | | llvm-svn: 54107
* implement codegen support for labels at the end of stmtexprs.Chris Lattner2008-07-261-1/+2
| | | | llvm-svn: 54100
* minor tidying, no functionality change.Chris Lattner2008-07-261-8/+3
| | | | llvm-svn: 54099
* Generate vector compares in codegenNate Begeman2008-07-251-2/+18
| | | | llvm-svn: 54048
* Fix a codegen crash on:Chris Lattner2008-07-231-6/+10
| | | | | | | | | | | int foo(void) { float x[2]; return x; } rdar://6093986 llvm-svn: 53946
* Add note to check what __alignof__ a function type should be.Daniel Dunbar2008-07-221-0/+1
| | | | llvm-svn: 53928
* Prevent codegen crash on sizeof(<function type>), a gcc extension.Daniel Dunbar2008-07-221-2/+3
| | | | llvm-svn: 53899
* Make a few related changes:Chris Lattner2008-06-301-1/+1
| | | | | | | | | | | | | | 1) add a new ASTContext::getFloatTypeSemantics method. 2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places. 3) Change the TargetInfo.h get*Format methods to return their fltSemantics byref instead of by pointer. 4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which sometimes expand specially and othertimes fall back to libm. 5) Add support for __builtin_nan("") to codegen, cases that don't pass in an empty string are currently lowered to libm calls. 6) Fix codegen of __builtin_infl. llvm-svn: 52914
* avoid a lot of unneeded selector processing work by passing aroundChris Lattner2008-06-261-6/+1
| | | | | | selectors instead of Value*'s. llvm-svn: 52760
* This patch is motivated by numerous strict-aliasing warnings when compilingTed Kremenek2008-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fix crash when codegening 'cond ? lhs : call-to-void-func()'Nuno Lopes2008-06-041-1/+1
| | | | llvm-svn: 51958
* Support for code generation of Objective-C top-level language constructs.Anton Korobeynikov2008-06-011-1/+1
| | | | | | Implemented by David Chisnall! llvm-svn: 51835
* Fix an extremely subtle bug with pointer comparisons: they have to be Eli Friedman2008-05-291-4/+4
| | | | | | | unsigned because it's possible (at least in theory) to have have both positive and negative pointers pointing to the same object. llvm-svn: 51681
* Fix for PR2001. I'm not really fond of it, but it is correct (unless Eli Friedman2008-05-251-1/+10
| | | | | | | | someone tries to make a bitfield volatile?). Not sure how to write a test; any suggestions? llvm-svn: 51558
* Backout of codegen-based fix to PR2334; this has been fixed differently Eli Friedman2008-05-161-4/+2
| | | | | | at the Sema layer. llvm-svn: 51203
* Patch for PR2334, and a similar ObjC bug.Eli Friedman2008-05-161-2/+4
| | | | llvm-svn: 51193
* Implementation of __builtin_shufflevector, a portable builtin capable of Eli Friedman2008-05-141-0/+12
| | | | | | | | | expressing the full flexibility of the LLVM shufflevector instruction. The expected immediate usage is in *mmintrin.h, so that they don't depend on the mess of gcc-inherited (and not completely implemented) shuffle builtins. llvm-svn: 51113
* Add codegen support for block-level compound literals.Eli Friedman2008-05-131-4/+1
| | | | llvm-svn: 51081
* implement a fixme, add support for ++/-- on long double.Chris Lattner2008-04-201-5/+6
| | | | llvm-svn: 49980
* use simplified ConstantFP:get method.Chris Lattner2008-04-201-5/+3
| | | | llvm-svn: 49979
* OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.Nate Begeman2008-04-181-3/+3
| | | | llvm-svn: 49942
* 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-1/+4
| | | | | | | | interaction for function parameters, fixing PR2046. Patch by Doug Gregor! llvm-svn: 49369
* tracking API changes arising from r49277Gabor Greif2008-04-061-7/+7
| | | | llvm-svn: 49279
* Since isComplexType() no longer returns true for _Complex integers, the codeChris Lattner2008-04-041-6/+6
| | | | | | generator needs to call isAnyComplexType(). This fixes PR1960. llvm-svn: 49220
* Codegen assignment to self correctly, patch by David Chisnall!Chris Lattner2008-04-041-2/+1
| | | | llvm-svn: 49201
* add a common base class "PointerLikeType" for PointerType and ReferenceType,Chris Lattner2008-04-021-2/+2
| | | | | | | allowing them to be treated the same in some contexts. A suggestion for a better name is welcome :) llvm-svn: 49100
* some cleanups on top of David's patch. There are still twoChris Lattner2008-03-301-17/+9
| | | | | | | | | | | | | remaining open issues I've communicated to him: 1) self can be assigned to, and his patch didn't handle it correctly. 2) CollectObjCIvarTypes is N^2 (because each subclass reprocesses all parent class ivars) and flattens classes. If A derives from B, and both have an int, I'd expect to get { {i32}, i32}, not { i32, i32}. David, please review. llvm-svn: 48970
* Add initial support for objc codegen for methods, ivars, and theChris Lattner2008-03-301-2/+10
| | | | | | etoile runtime, patch by David Chisnall! llvm-svn: 48969
* simplify the clang codegen by using the new Builder.CreateStructGEP method.Chris Lattner2008-03-191-5/+2
| | | | llvm-svn: 48534
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-0/+1185
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
OpenPOWER on IntegriCloud