aboutsummaryrefslogtreecommitdiff
path: root/CodeGen
AgeCommit message (Collapse)Author
2008-01-21Simplify the bitfield codegen.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46230 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-18Assert that the type of the cast is equal to the _unqualified_ type of the ↵Anders Carlsson
subexpression. Fixes a problem spotted by Nuno Lopes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46158 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-17Match change in EmitCallExprNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46136 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-17Fix for EmitCallExpr changed in OverloadExpr patchNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46135 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-17Implement basic overload support via a new builtin, __builtin_overload.Nate Begeman
__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); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46132 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14Add codegen upport for implicit casts to aggregate exprs.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45954 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12Fix the type of predefined identifiers like __func__. Patch byChris Lattner
Eli Friedman! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45906 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12Add first pieces of support for parsing and representing Chris Lattner
extern "C" in C++ mode. Patch by Mike Stump! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45904 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09implement proper support for _Bool in memory, which is usually i8, not i1.Chris Lattner
This fixes a crash reported by Seo Sanghyeon git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45778 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek
some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03fix long lines.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45531 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03Fix a crash reported by Seo Sanghyeon.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45530 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-30Allow implicit casts during arithmetic for OCUVector operationsNate Begeman
Add codegen support and test for said casts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45443 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-30Allow codegen of vector fdivNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45440 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29implement codegen support for most unary operators when Chris Lattner
initializing a global. This handles important cases like: float foo3 = -0.01f; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45427 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29remove attribution from makefiles.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45412 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner
discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Enable CodeGen for member expressions based on call expressions returning ↵Christopher Lamb
aggregate types. This enables expressions like 'foo().member.submember'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45395 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Make MemberExpr code safe w.r.t. address spaces.Christopher Lamb
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45394 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-26No need to do work that the folding builder does for us.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45361 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-26Remove broken assert from CodeGen. Better check is done in Sema.Seo Sanghyeon
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45358 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-23String literal in aggregate expressionSeo Sanghyeon
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45330 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Convert opaque type when struct definition is seen.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45287 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Keep track of llvm struct size while adding fields.Devang Patel
Update addPaddingFields() interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45284 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20Implement codegen for ordered comparison builtins.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45243 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18local static vars are globals also. This fixes a testcaseChris Lattner
reported by Seo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45156 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Turns out the LLVMFoldingBuilder can fold InsertElement. Knowing this, we ↵Anders Carlsson
can get rid of our special casing of constants when creating vectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45145 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18introduce a new CodeGenModule::getIntrinsic method, which wraps Chris Lattner
Intrinsic::getDeclaration, allowing much more terse code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45136 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Patch to implemented objective-c's dynamic object pointer qualified withFariborz Jahanian
the protocol list (id<P,...> types). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45121 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Make the insertion point with an explicit new instead of the builder.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45118 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17add a hack so that codegen doesn't abort on missing sema of initializers, nowChris Lattner
we emit stuff like this: abort on missing sema of initializers, now we emit stuff like this: t3.c:1:24: warning: cannot codegen this initializer yet const char x[2][4] = { { 'a', 'b', '\0', '\0' }, { 'c', 'd', 'e', '\0' } }; ^~~~~~~~~~~~~~~~~~~~~~~~ This should be removed when sema is finished. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45086 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Update to use new PointerType::getUnqual() api.Christopher Lamb
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45081 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-16Start generating SSE intrinsics.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45079 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-15We now support all MMX intrinsics. SSE intrinsics are next.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45062 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-14Simplify the vector code. Add more shift intrinsics.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45035 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-14Array subscription in aggregate expressionSeo Sanghyeon
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45023 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-14Implement dereference operator in aggregate expressionSeo Sanghyeon
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45020 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-13minor cleanupsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44996 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-13simplify some code.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44994 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-13Add assert to detect incomplete implementation work.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44974 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-13builtin id 0 is invalid, don't use a slot for it.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44968 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12fix off-by-one error.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44963 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12TargetInfo no longer includes a reference to SourceManager.Ted Kremenek
Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation. Added many utility methods to FullSourceLoc to provide shorthand for: FullLoc.getManager().someMethod(FullLoc.getLocation()); instead we have: FullLoc.someMethod(); Modified TextDiagnostics (and related classes) to use this short-hand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44957 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-12Fix a codegen crash on test/CodeGen/cast.c, reported by Keith.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44908 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Match union field type when member expression is u->xDevang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44879 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. NowTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Refactor bit-field handling code into a separate method.Devang Patel
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44875 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11fix a build issue with non-apple-gcc-4.0 compilers.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44844 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Generate more builtins.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44841 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Generate code for some more intrinsics.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44839 91177308-0d34-0410-b5e6-96231b3b80d8