summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
Commit message (Collapse)AuthorAge
...
* Implemented memmove_collectable API for Next runtimeFariborz Jahanian2009-07-08
| | | | | | | | when struct variables with GC'able members are copied into. Will provide a test case later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74984 91177308-0d34-0410-b5e6-96231b3b80d8
* De-ASTContext-ify DeclContext.Argyrios Kyrtzidis2009-06-30
| | | | | | | Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
* Use PushConditionalTempDestruction/PopConditionalTempDestruction for the ↵Anders Carlsson2009-06-04
| | | | | | ternary operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72842 91177308-0d34-0410-b5e6-96231b3b80d8
* PR4316: Fix IRGen for cast-to-union extension.Eli Friedman2009-06-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72803 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit destructors correctly for temporaries.Anders Carlsson2009-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72655 91177308-0d34-0410-b5e6-96231b3b80d8
* Add lvalue irgen support for CXXBindTemporaryExpr.Anders Carlsson2009-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72649 91177308-0d34-0410-b5e6-96231b3b80d8
* More temporary support.Anders Carlsson2009-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72648 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove VarDecl from CXXConstructExpr.Anders Carlsson2009-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72633 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup the rest of the trivial cases of the codegen of volatile. IfMike Stump2009-05-29
| | | | | | | | any body can spot codegen bugs with volatile, or knows of any in the bug database, let me know. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72572 91177308-0d34-0410-b5e6-96231b3b80d8
* PR4281: Fix bogus CodeGen assertion. The issue is that Eli Friedman2009-05-28
| | | | | | | | | getUnqualifiedType() doesn't strip off all qualifiers for non-canonical types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72552 91177308-0d34-0410-b5e6-96231b3b80d8
* No write-barrier for initializations.Fariborz Jahanian2009-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72492 91177308-0d34-0410-b5e6-96231b3b80d8
* IRgen support for calls to functions that return references to aggregate ↵Anders Carlsson2009-05-27
| | | | | | exressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72479 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo. I also fixed the hard to read case differences, so that noMike Stump2009-05-27
| | | | | | | one else is tempted to copy the style, incorrectly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72448 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup codegen for volatile structs in the trivial cases (a a=a and a=a=a).Mike Stump2009-05-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72439 91177308-0d34-0410-b5e6-96231b3b80d8
* Esnure that if we have a volatile structure as the destination, thatMike Stump2009-05-26
| | | | | | | we actually have a destination. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72429 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate volatile for implicit property refernces.Mike Stump2009-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72353 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate volatile around for property references.Mike Stump2009-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72352 91177308-0d34-0410-b5e6-96231b3b80d8
* Track volatile aggregate copies better. I'm hoping someone else will decideMike Stump2009-05-23
| | | | | | | how to get the backend to know that the operation is volatile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72348 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix thinko, and implement aggregate volatile reads.Mike Stump2009-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72347 91177308-0d34-0410-b5e6-96231b3b80d8
* More volatile fixes. Can't testcase these yet as ultimately volatileMike Stump2009-05-23
| | | | | | | is still ignored. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72344 91177308-0d34-0410-b5e6-96231b3b80d8
* Collapse a few FIXMEs together and refactor to make fixing the code easier.Mike Stump2009-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72342 91177308-0d34-0410-b5e6-96231b3b80d8
* One step to fixing up codegen for a=b, where a is a volatile struct.Mike Stump2009-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72315 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Mike Stump2009-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72308 91177308-0d34-0410-b5e6-96231b3b80d8
* Have AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. ↵Anders Carlsson2009-05-19
| | | | | | Stub out VisitCXXExprWithTemporaries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72103 91177308-0d34-0410-b5e6-96231b3b80d8
* Reflow some comments.Mike Stump2009-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71937 91177308-0d34-0410-b5e6-96231b3b80d8
* Make codegen for constructors work again.Anders Carlsson2009-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70785 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR4067: [Linux kernel] cannot aggregate codegen stmtexpr as lvalue Chris Lattner2009-04-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70067 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR4026: Clang can't codegen __func__ without implicit castChris Lattner2009-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69747 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement basic code generation of constructor calls. We can now compile:Anders Carlsson2009-04-17
| | | | | | | | | | | | | | struct S { S(int, int); }; void f() { S s(10, 10); } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69330 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor work related to removing the assumption that value initialization Eli Friedman2009-04-13
| | | | | | | | implies an all-zero bit pattern. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68994 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate the ASTContext to various AST traversal and lookup functions.Douglas Gregor2009-04-09
| | | | | | | No functionality change (really). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup.Eli Friedman2009-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67896 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Eli Friedman2009-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67477 91177308-0d34-0410-b5e6-96231b3b80d8
* Add codegen support for aggregate BlockDeclRefExprs.Mike Stump2009-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67207 91177308-0d34-0410-b5e6-96231b3b80d8
* brain thinking memcpy, fingers thinking memset :)Chris Lattner2009-02-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65701 91177308-0d34-0410-b5e6-96231b3b80d8
* after going around in circles a few times, finally cave and emit structureChris Lattner2009-02-28
| | | | | | | | | copies with memcpy instead of memmove. This matches what GCC does and if it causes a problem with a particular libc we can always fix it with a target hook. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65699 91177308-0d34-0410-b5e6-96231b3b80d8
* rip out __builtin_overloadChris Lattner2009-02-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961 91177308-0d34-0410-b5e6-96231b3b80d8
* Use EmitVAListRef instead of EmitLValue directly to handle array decayDaniel Dunbar2009-02-11
| | | | | | | case on x86_64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64333 91177308-0d34-0410-b5e6-96231b3b80d8
* Make CodeGen produce an error if we come across a non-constant initializer ↵Douglas Gregor2009-01-29
| | | | | | list that involves the GNU array-range designator extension git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63327 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new expression node, ImplicitValueInitExpr, thatDouglas Gregor2009-01-29
| | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63317 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up designated initialization of unions, so that CodeGen doesn'tDouglas Gregor2009-01-29
| | | | | | | have to try to guess which member is being initialized. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63315 91177308-0d34-0410-b5e6-96231b3b80d8
* Improvements to code-generation and semantic analysis of designatedDouglas Gregor2009-01-28
| | | | | | | | | | | | | | initializers. - We now initialize unions properly when a member other than the first is named by a designated initializer. - We now provide proper semantic analysis and code generation for GNU array-range designators *except* that side effects will occur more than once. We warn about this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63253 91177308-0d34-0410-b5e6-96231b3b80d8
* Code generation support for C99 designated initializers.Douglas Gregor2009-01-28
| | | | | | | | | | | | | | | | | | | | | | The approach I've taken in this patch is relatively straightforward, although the code itself is non-trivial. Essentially, as we process an initializer list we build up a fully-explicit representation of the initializer list, where each of the subobject initializations occurs in order. Designators serve to "fill in" subobject initializations in a non-linear way. The fully-explicit representation makes initializer lists (both with and without designators) easy to grok for codegen and later semantic analyses. We keep the syntactic form of the initializer list linked into the AST for those clients interested in exactly what the user wrote. Known limitations: - Designating a member of a union that isn't the first member may result in bogus initialization (we warn about this) - GNU array-range designators are not supported (we warn about this) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63242 91177308-0d34-0410-b5e6-96231b3b80d8
* Support CodeGen for __extension__ operator on aggregates.Eli Friedman2009-01-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63101 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename Expr::isConstantExpr to Expr::isConstantInitializer; this more Eli Friedman2009-01-25
| | | | | | | | | | accurately states what the function is trying to do and how it is different from Expr::isEvaluatable. Also get rid of a parameter that is both unused and inaccurate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62951 91177308-0d34-0410-b5e6-96231b3b80d8
* add codegen support to union castsNuno Lopes2009-01-15
| | | | | | | init of static vars still not working. I'll get back to it tomorrow or so git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62278 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevent a segfault for vaarg expressions on unsupported architectures.Sebastian Redl2009-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62008 91177308-0d34-0410-b5e6-96231b3b80d8
* Unifies the name-lookup mechanisms used in various parts of the ASTDouglas Gregor2008-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60878 91177308-0d34-0410-b5e6-96231b3b80d8
* Disabling this code due to regression on test/CodeGen/bitfield.c. See Eli Friedman2008-12-02
| | | | | | | | PR3152. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60389 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR2969: generate a memcpy from a constant for constant Eli Friedman2008-11-30
| | | | | | | | | | initializers. llvm-gcc appears to be more aggressive, but incorrect, for constructs like "const int a[] = {1,2,3};"; that said, current optimizers will do the appropriate optimizations when safe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60270 91177308-0d34-0410-b5e6-96231b3b80d8