aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CGExpr.cpp
AgeCommit message (Collapse)Author
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-09Propagate calling convention information to function declarations and CallInstNate Begeman
instructions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48077 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-16Implement extern block var.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47223 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Remove useless parameter from isConstantSizeType.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47156 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-12Adjust for the API change to APInt::getBitsSet.Dan Gohman
People more familiar with clang than me, please review this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47033 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-09Expose the logic for field address codegen; it is needed for aggregate Eli Friedman
initializers, and I don't want to duplicate the bitfield-handling code. (I'll send a patch for aggregate initializers to the mailing list sometime soon.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46904 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Simplify bitfield codegen.Lauro Ramos Venancio
Fix codegen of struct { short a[3]; int b:15; }. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46859 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30fix a problem reported by Eli, caused by not keeping bool as i1 Chris Lattner
when in a register. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46552 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Make sure to emit all the arguments to a function call. This fixes the Eli Friedman
codegen of calls to functions without a prototype and varargs functions, including printf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46543 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-22Fix a typo.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46259 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-22Implement bitfield write.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46258 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-22Implement bitfield read.Lauro Ramos Venancio
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46257 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-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
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-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-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-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-10Add assert to flag incomplete bit-field support.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44800 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02fix logic for member expr codegen.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44520 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02Handle global variable definitions which change the type of a definition, ↵Chris Lattner
such as: extern int x[]; void foo() { x[0] = 1; } int x[10]; void bar() { x[0] = 1; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44509 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02convert the rest of the stderr users in codegen to use diagnostics.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44503 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30fix a bug handling typedefs in member expr codegen. Patch Chris Lattner
by Seo Sanghyeon git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44455 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30Fix a codegen crash on void ?: reported by OliverChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44454 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-28Implement support for -fwritable-strings and make the code generatorChris Lattner
merge string literals when it is not provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44394 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30__real__ and __imag__ can be lvalues. Add support to ast and codegen for them.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43525 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-30Fix 80 col violations.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43516 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26Codegen union member references.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43390 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-26Handle non LValue base expressions.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43387 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24HandleDevang Patel
foo()->a = 42; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43315 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24check base type.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43283 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24Use isUnionType() predicate.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43281 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-24untabifyDevang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43280 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-23Handle simple struct member expr.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43258 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-07move IdentifierTable.h from liblex to libbasic.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42730 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-16fix some warnings, patch by Justin HandvilleChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42010 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-13Phase 2 of making the Decl class more lightweight...Steve Naroff
Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl. Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41934 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-13When dumping out errors about unsupported stuff, emit loc info.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41907 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31Generalize RValue to handle complex better, generalize EmitCompoundStmt toChris Lattner
support any sort of expr, add a new EmitAnyExpr routine. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41660 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31Implement codegen support for lowering "library builtins" like __builtin_isinf Chris Lattner
to their corresponding library routines (e.g. isinf). This allows us to handle all the stuff in macos math.h, and other stuff as it's added to *Builtins.def. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41634 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-29remove some ugly code now that implicit defs are being generated in this ↵Chris Lattner
case, thanks Steve! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41560 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26remove dead codeChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41470 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26eliminate EmitAnyExpr, inlining it and simplifying it into its only caller.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41468 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26eliminate use of EmitAnyExpr.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41467 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26remove ConvertScalarValueToBool.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41447 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26be slightly more volatile correctChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41444 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26Omit EmitConversionChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41438 91177308-0d34-0410-b5e6-96231b3b80d8