summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* IRgen: Move the bit-field access type into CGBitFieldInfo, and change ↵Daniel Dunbar2010-04-081-15/+18
| | | | | | bit-field LValues to just store the base address of object containing the bit-field. llvm-svn: 100745
* IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.Daniel Dunbar2010-04-061-7/+9
| | | | llvm-svn: 100513
* Simplify.Daniel Dunbar2010-04-061-6/+2
| | | | llvm-svn: 100511
* IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.Daniel Dunbar2010-04-051-15/+14
| | | | | | | | | - Unfortunately, this requires some horrible code in CGObjCMac which always allocats a CGBitFieldInfo because we don't currently build a proper layout for Objective-C classes. It needs to be cleaned up, but I don't want the bit-field cleanups to be blocked on that. llvm-svn: 100474
* IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.Daniel Dunbar2010-04-051-1/+1
| | | | llvm-svn: 100433
* IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out ↵Daniel Dunbar2010-03-311-3/+10
| | | | | | | | of CodeGenTypes, to per-record CGRecordLayout structures. - I did a cursory check that this was perf neutral, FWIW. llvm-svn: 99978
* Introduce a new kind of derived-to-base cast which bypasses the need forJohn McCall2010-03-301-0/+1
| | | | | | | null checks, and make sure we elide null checks when accessing base class members. llvm-svn: 99963
* Minor formatting/FIXME cleanups.Daniel Dunbar2010-03-301-1/+0
| | | | llvm-svn: 99944
* Fix PR6473.Rafael Espindola2010-03-041-0/+10
| | | | | | | | | Clang's support for weakref is now better than llvm-gcc's :-) We don't introduce a new symbol and we correctly mark undefined references weak only if there is no definition or regular undefined references in the same file. llvm-svn: 97733
* IRgen: Add CreateIRTemp, which creates a temporary alloca but with type ↵Daniel Dunbar2010-02-161-1/+11
| | | | | | converted "not-for-memory". Dunno a better name. llvm-svn: 96374
* IRgen: Switch EmitCompoundLiteralLValue to use CreateMemTemp.Daniel Dunbar2010-02-161-3/+1
| | | | llvm-svn: 96373
* When emitting an aggregate into a temporary, make sure we set the alignmentJohn McCall2010-02-151-1/+1
| | | | | | | | | on the alloca. The fact that codegen makes this class of bug so wonderfully easy to make is embarrassing. llvm-svn: 96204
* More vtable layout dumper improvements. Handle destructors, dump the ↵Anders Carlsson2010-02-111-2/+1
| | | | | | complete function type of the member functions (using PredefinedExpr::ComputeName. llvm-svn: 95887
* IRgen: Add CreateMemTemp, for creating an temporary memory object for a ↵Daniel Dunbar2010-02-091-11/+15
| | | | | | | | | | particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing. - This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome! PR6240. llvm-svn: 95648
* Reapply r95393, without the change to CGExpr. I was wrong in assuming that theDaniel Dunbar2010-02-081-0/+2
| | | | | | element type always matched the converted LLVM type for ExprType. llvm-svn: 95596
* Standardize the parsing of function type attributes in a way thatJohn McCall2010-02-051-14/+4
| | | | | | | | | | | | follows (as conservatively as possible) gcc's current behavior: attributes written on return types that don't apply there are applied to the function instead, etc. Only parse CC attributes as type attributes, not as decl attributes; don't accepet noreturn as a decl attribute on ValueDecls, either (it still needs to apply to other decls, like blocks). Consistently consume CC/noreturn information throughout codegen; enforce this by removing their default values in CodeGenTypes::getFunctionInfo(). llvm-svn: 95436
* Revert r95393, which broke Clang's self-host.Douglas Gregor2010-02-051-2/+3
| | | | llvm-svn: 95430
* IRgen: A few more ConvertType cleanups.Daniel Dunbar2010-02-051-11/+6
| | | | llvm-svn: 95423
* IRgen: Factor out EmitAggExprToLValue.Daniel Dunbar2010-02-051-14/+6
| | | | llvm-svn: 95416
* IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that isDaniel Dunbar2010-02-051-1/+2
| | | | | | conceptually correct. Review appreciated (Chris, Eli, Anders). llvm-svn: 95401
* Now that we store calling conventions in the types, use them instead ofCharles Davis2010-02-051-6/+10
| | | | | | | getting the calling convention from the target function, which may or may not exist. Fixes PR5280. llvm-svn: 95399
* IRgen: Use hasAggregateLLVMType instead of isSingleValueType() for cases thatDaniel Dunbar2010-02-051-3/+2
| | | | | | | | need to deal with aggregates specially; this is consistent with the rest of IRgen. Also, simplify EmitParmDecl and don't worry about using Decl::getNameAsString. llvm-svn: 95393
* When binding an lvalue to a reference, we always need to pop temporaries.Anders Carlsson2010-02-041-1/+9
| | | | | | | | | | | | | With this fix, and the other fixes committed today a make check-all with a clang-built LLVM now gives: Expected Passes : 6933 Expected Failures : 46 Unsupported Tests : 40 Unexpected Failures: 27 which means that we pass 99.96% of all tests :) The resulting 27 tests are all LLVMC tests and seem to be because of differences in the clang and gcc drivers. llvm-svn: 95313
* Fix a bug where we would not mark temporaries as conditional when emitting a ↵Anders Carlsson2010-02-041-1/+7
| | | | | | conditional operator as an lvalue. llvm-svn: 95311
* Revert the new reference binding code; I came up with a way simpler solution ↵Anders Carlsson2010-02-031-25/+0
| | | | | | for the reference binding bug that is preventing self-hosting. llvm-svn: 95223
* Move pointer to data member emission to CodeGenModule and use it in ↵Anders Carlsson2010-02-021-16/+5
| | | | | | CGExprConstant. Fixes PR5674. llvm-svn: 95063
* Start creating CXXBindReferenceExpr nodes when binding complex types to ↵Anders Carlsson2010-01-311-0/+22
| | | | | | references. llvm-svn: 94964
* Add a new EmitLValueForFieldInitialization that will be used for ↵Anders Carlsson2010-01-291-0/+17
| | | | | | initializing fields (and reference type fields in particular). llvm-svn: 94799
* Simplify EmitLValueForField - we can get whether the field is part of a ↵Anders Carlsson2010-01-291-12/+3
| | | | | | union or not from the FieldDecl (through its DeclContext). llvm-svn: 94798
* Add an CXXBindReferenceExpr (not used just yet).Anders Carlsson2010-01-291-0/+2
| | | | llvm-svn: 94791
* Use CharUnits for alignment in EmitNullInitializationLValue().Ken Dyck2010-01-261-2/+2
| | | | llvm-svn: 94563
* Roll out ASTContext::getTypeSizeInChars(), replacing instances ofKen Dyck2010-01-111-3/+3
| | | | | | | | | | "ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits ones as appropriate. Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, fromQuantity(), and getQuantity() for clarity. llvm-svn: 93153
* implement codegen support for preinc as an lvalue, PR5514.Chris Lattner2010-01-091-2/+10
| | | | llvm-svn: 93076
* refactor pre/postinc logic into CGF and require the caller to pass in theChris Lattner2010-01-091-0/+126
| | | | | | lvalue to poke, no functionality change. llvm-svn: 93075
* Fix -Asserts warning.Daniel Dunbar2010-01-041-2/+2
| | | | llvm-svn: 92491
* Minor optimization; emit proper unsupported messages for a couple of cases.Eli Friedman2009-12-251-2/+1
| | | | llvm-svn: 92153
* Some small improvements to dead code elimination; helps a bit onEli Friedman2009-12-251-0/+9
| | | | | | LLVM-Code-Symbols test. llvm-svn: 92152
* Pass the return value slot to all call exprs.Anders Carlsson2009-12-241-3/+3
| | | | llvm-svn: 92145
* Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us ↵Anders Carlsson2009-12-241-3/+5
| | | | | | halfway towards fixing PR5824. llvm-svn: 92142
* Pass ReturnValueSlot to EmitCall. No functionality change yet.Anders Carlsson2009-12-241-1/+1
| | | | llvm-svn: 92138
* Add a ReturnValueSlot class. Change the argument order in EmitCall to match ↵Anders Carlsson2009-12-241-2/+2
| | | | | | the other overload better. llvm-svn: 92136
* simplify my previous patch.Chris Lattner2009-12-231-9/+2
| | | | llvm-svn: 92057
* fix opencl extvector element extraction on rvalues. We previouslyChris Lattner2009-12-231-8/+30
| | | | | | error_unsupported on test10 and crashed on test11. llvm-svn: 92056
* Fix for PR5524: make reference binding in default argument work correctly.Eli Friedman2009-12-191-1/+4
| | | | llvm-svn: 91733
* Implement additional undefined checks for additional loads and stores. WIP.Mike Stump2009-12-161-1/+37
| | | | llvm-svn: 91498
* Fixes a code gen bug related to accessing a nowFariborz Jahanian2009-12-151-0/+1
| | | | | | | | | non-existing 'isa' field of a non-existing struct type all related to legacy type definition for 'id' which we have dropped in clang in favor of a built-in type. (fixes radar 7470820). llvm-svn: 91455
* ShouldDestroyTemporaries? I don't think so.Anders Carlsson2009-12-151-4/+3
| | | | llvm-svn: 91450
* Fix spacing.Mike Stump2009-12-151-1/+1
| | | | llvm-svn: 91386
* Ensure we preserve line information for each trap forMike Stump2009-12-151-1/+9
| | | | | | -fcatch-undefined-behavior if we aren't optimizing. WIP. llvm-svn: 91382
* Switch codegen for -fcatch-undefined-bahavior over to __builtin_trapMike Stump2009-12-151-19/+13
| | | | | | instead of abort to improve codesize and codegen. llvm-svn: 91374
OpenPOWER on IntegriCloud