summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CGExprScalar.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-1185/+0
| | | | | | | | | | 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
* remove the source location arguments to various target query methods.Chris Lattner2008-03-051-8/+5
| | | | llvm-svn: 47954
* Add codegen support for ObjC message expressions with the GNU runtime.Chris Lattner2008-03-011-1/+48
| | | | | | Patch by David Chisnall! llvm-svn: 47789
* implement codegen support for sizeof(void), fixing PR2080.Chris Lattner2008-02-211-4/+9
| | | | llvm-svn: 47429
* implement codegen support for aggregates casted to void.Chris Lattner2008-02-161-4/+12
| | | | llvm-svn: 47226
* minor tweak to anders patch: (only) ocu vectors support splatting, butChris Lattner2008-02-021-7/+4
| | | | | | | ocu vectors should not treat bitcasts from int <-> vector as a splat unless it is of the element type. llvm-svn: 46664
* Only OCU vectors can be splatted.Anders Carlsson2008-02-011-2/+2
| | | | llvm-svn: 46651
* Fix PR1921 by promoting negative indices to intptrty.Chris Lattner2008-01-311-2/+14
| | | | llvm-svn: 46599
* Implement first round of feedback on __builtin_overloadNate Begeman2008-01-301-1/+2
| | | | llvm-svn: 46572
* Make sure to emit all the arguments to a function call. This fixes the Eli Friedman2008-01-301-1/+1
| | | | | | | codegen of calls to functions without a prototype and varargs functions, including printf. llvm-svn: 46543
* Fix a bug where CodeGen would attempt to erase an instruction that was Eli Friedman2008-01-291-1/+5
| | | | | | already used. llvm-svn: 46519
* Implement __builtin_offsetof.Anders Carlsson2008-01-291-1/+12
| | | | llvm-svn: 46515
* Correctly handle scalars in braces.Anders Carlsson2008-01-291-1/+5
| | | | llvm-svn: 46480
* Problem with ObjC's type-encoding of nested structs causing infinit recursion.Fariborz Jahanian2008-01-221-2/+3
| | | | llvm-svn: 46260
* Implement basic overload support via a new builtin, __builtin_overload.Nate Begeman2008-01-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | __builtin_overload takes 2 or more arguments: 0) a non-zero constant-expr for the number of arguments the overloaded functions will take 1) the arguments to pass to the matching overloaded function 2) a list of functions to match. The return type of __builtin_overload is inferred from the function whose args match the types of the arguments passed to the builtin. For example: float a; float sinf(float); int sini(int); float b = __builtin_overload(1, a, sini, sinf); Says that we are overloading functions that take one argument, and trying to pass an argument of the same type as 'a'. sini() does not match since it takes and argument of type int. sinf does match, so at codegen time this will turn into float b = sinf(a); llvm-svn: 46132
* Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek2008-01-071-1/+1
| | | | | | | some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. llvm-svn: 45715
* fix long lines.Chris Lattner2008-01-031-3/+3
| | | | llvm-svn: 45531
* Fix a crash reported by Seo Sanghyeon.Chris Lattner2008-01-031-4/+24
| | | | llvm-svn: 45530
* Allow implicit casts during arithmetic for OCUVector operationsNate Begeman2007-12-301-2/+12
| | | | | | Add codegen support and test for said casts. llvm-svn: 45443
* Allow codegen of vector fdivNate Begeman2007-12-301-1/+1
| | | | llvm-svn: 45440
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* No need to do work that the folding builder does for us.Anders Carlsson2007-12-261-37/+14
| | | | llvm-svn: 45361
* Remove broken assert from CodeGen. Better check is done in Sema.Seo Sanghyeon2007-12-261-4/+1
| | | | llvm-svn: 45358
* Turns out the LLVMFoldingBuilder can fold InsertElement. Knowing this, we ↵Anders Carlsson2007-12-181-49/+3
| | | | | | can get rid of our special casing of constants when creating vectors. llvm-svn: 45145
* We now support all MMX intrinsics. SSE intrinsics are next.Anders Carlsson2007-12-151-0/+34
| | | | llvm-svn: 45062
* Fix a codegen crash on test/CodeGen/cast.c, reported by Keith.Chris Lattner2007-12-121-1/+11
| | | | llvm-svn: 44908
* Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. NowTed Kremenek2007-12-111-1/+1
| | | | | | | | | | | | | | | | | | SourceManager is passed by reference, allowing the SourceManager to be associated with a specific translation unit, and not the entire execution of the driver. Modified all users of Diagnostics to comply with this new interface. Integrated SourceManager as a member variable of TargetInfo. TargetInfo will eventually be associated with a single translation unit (just like SourceManager). Made the SourceManager reference in ASTContext private. Provided accessor getSourceManager() for clients to use instead. Modified clients to comply with new interface. llvm-svn: 44878
* Added missing inclusion of stdarg.h. Now CGExprScalar.cppTed Kremenek2007-12-101-0/+2
| | | | | | compiles again on Linux. llvm-svn: 44821
* Add EmitShuffleVector helper method.Anders Carlsson2007-12-101-0/+30
| | | | llvm-svn: 44806
* Implement CodeGen for vectors. Don't create unnecessary conversion ↵Anders Carlsson2007-12-051-18/+89
| | | | | | instructions if the value to be converted is a constant. llvm-svn: 44606
* Ignore typedefs in pointer arithmetic codegen.Seo Sanghyeon2007-12-031-4/+4
| | | | llvm-svn: 44529
* convert the rest of the stderr users in codegen to use diagnostics.Chris Lattner2007-12-021-2/+1
| | | | llvm-svn: 44503
* Fix a codegen crash on void ?: reported by OliverChris Lattner2007-11-301-4/+7
| | | | llvm-svn: 44454
* Fix sema support for the gnu ?: expression with a Chris Lattner2007-11-261-3/+13
| | | | | | | | missing middle expression, and fix a codegen bug where we didn't correctly promote the condition to the right result type. This fixes PR1824. llvm-svn: 44322
* Implement codegen of CXX BoolNate Begeman2007-11-151-0/+3
| | | | llvm-svn: 44160
* Fix a typo that prevented pointer-to-int conversions from working.Anders Carlsson2007-10-311-1/+1
| | | | llvm-svn: 43588
* Fix 80 col violations.Devang Patel2007-10-301-5/+8
| | | | llvm-svn: 43516
* Remove commented out line.Devang Patel2007-10-301-2/+1
| | | | llvm-svn: 43508
* Add (partial) support for @encode.Anders Carlsson2007-10-291-0/+19
| | | | llvm-svn: 43439
* Fix "strbuf += stufflen;" crash.Devang Patel2007-10-251-2/+4
| | | | llvm-svn: 43365
* Add a new ChooseExpr::isConditionTrue method to unifyChris Lattner2007-10-251-5/+1
| | | | | | some code. llvm-svn: 43322
* Handle non-constant initializers.Devang Patel2007-10-241-5/+6
| | | | llvm-svn: 43301
* Visit CompoundLiteralExpr and InitListExprDevang Patel2007-10-241-2/+16
| | | | llvm-svn: 43300
* Updated VC++ build system.Hartmut Kaiser2007-10-171-1/+2
| | | | | | | | Silenced some VC++ warnings. Had to rephrase a partial specialization of the IntrospectionTrait struct in SerializationTest.cpp, please review. Added a compiler specific workaround in IdentifierTable.h. Is that the way to fix this kind of issues? llvm-svn: 43074
* Move type compatibility predicates from Type to ASTContext. In addition, the ↵Steve Naroff2007-10-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | predicates are now instance methods (they were previously static class methods on Type). This allowed me to fix the following hack from this weekend... // FIXME: Devise a way to do this without using strcmp. // Would like to say..."return getAsStructureType() == IdStructType;", but // we don't have a pointer to ASTContext. bool Type::isObjcIdType() const { if (const RecordType *RT = getAsStructureType()) return !strcmp(RT->getDecl()->getName(), "objc_object"); return false; } ...which is now... bool isObjcIdType(QualType T) const { return T->getAsStructureType() == IdStructType; } Side notes: - I had to remove a convenience function from the TypesCompatibleExpr class. int typesAreCompatible() const {return Type::typesAreCompatible(Type1,Type2);} Which required a couple clients get a little more verbose... - Result = TCE->typesAreCompatible(); + Result = Ctx.typesAreCompatible(TCE->getArgType1(), TCE->getArgType2()); Overall, I think this change also makes sense for a couple reasons... 1) Since ASTContext vends types, it makes sense for the type compatibility API to be there. 2) This allows the type compatibility predeciates to refer to data not strictly present in the AST (which I have found problematic on several occasions). llvm-svn: 43009
* Add code generation and sema checking for __builtin_va_arg.Anders Carlsson2007-10-151-0/+10
| | | | llvm-svn: 43006
* Fix an incorrect assertion.Anders Carlsson2007-10-131-2/+3
| | | | llvm-svn: 42951
* Generate code for va_start and va_end.Anders Carlsson2007-10-121-0/+5
| | | | llvm-svn: 42939
* Use LLVMFoldingBuilderDevang Patel2007-10-091-1/+1
| | | | llvm-svn: 42807
* further apfloat'ize the front-end, allowing codegen to pass Chris Lattner2007-09-221-7/+1
| | | | | | APFloat straight through to LLVM now. llvm-svn: 42236
OpenPOWER on IntegriCloud