summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprConstant.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Move pointer to data member emission to CodeGenModule and use it in ↵Anders Carlsson2010-02-021-8/+32
| | | | | | CGExprConstant. Fixes PR5674. llvm-svn: 95063
* Some class related cleanup.Anders Carlsson2010-01-311-2/+2
| | | | llvm-svn: 94938
* Created __builtin___NSStringMakeConstantString() builtin, which generates ↵David Chisnall2010-01-231-3/+11
| | | | | | constant Objective-C strings. llvm-svn: 94274
* Convert the type of the LValue offset variable in APValue to CharUnits, movingKen Dyck2010-01-151-1/+1
| | | | | | the LValue-related methods of APValue out of line to avoid header file leaching. llvm-svn: 93512
* When emitting member function pointers, use the canonical decl if the member ↵Anders Carlsson2010-01-051-0/+2
| | | | | | function is virtual. Fixes PR5940. llvm-svn: 92680
* Get rid of some unnecessary code.Eli Friedman2010-01-021-27/+2
| | | | llvm-svn: 92432
* Update CGExprConstant for change to emit padding values as undef.Daniel Dunbar2009-12-081-1/+5
| | | | | | - This fixes 2003-05-21-BitfieldHandling. llvm-svn: 90876
* Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.Benjamin Kramer2009-11-281-4/+2
| | | | llvm-svn: 90044
* Don't build the entire vtable when all we want is the index of a virtual method.Anders Carlsson2009-11-271-2/+3
| | | | llvm-svn: 90017
* Support emitting aggregate class initializers. Fixes PR5581.Anders Carlsson2009-11-211-1/+1
| | | | llvm-svn: 89569
* Avoid assert-crash in a case where the expression passed to EmitConstantExprEli Friedman2009-11-141-3/+1
| | | | | | legitimately has side-effects (and needs to be generated as a non-constant). llvm-svn: 88767
* Make __func__ and friends work correctly within the initializer for a staticEli Friedman2009-11-141-6/+8
| | | | | | local variable. llvm-svn: 88766
* Obvious fix for PR5474.Eli Friedman2009-11-131-1/+1
| | | | llvm-svn: 88696
* indirectbr seems to work! Rip out the old code.Chris Lattner2009-11-061-8/+0
| | | | llvm-svn: 86256
* make clang emit undefs for padding of structs and unions instead of zeros. ↵Nuno Lopes2009-10-291-3/+3
| | | | | | this enables constant compaction optimizations. llvm-svn: 85504
* Implement clang support for indirect branch and address of labelChris Lattner2009-10-281-0/+6
| | | | | | | | using the new LLVM support for this. This is temporarily hiding behind horrible and ugly #ifdefs until the time when the optimizer is stable (hopefully a week or so). Until then, lets make it "opt in" :) llvm-svn: 85446
* Eliminate QualifiedDeclRefExpr, which captured the notion of aDouglas Gregor2009-10-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | qualified reference to a declaration that is not a non-static data member or non-static member function, e.g., namespace N { int i; } int j = N::i; Instead, extend DeclRefExpr to optionally store the qualifier. Most clients won't see or care about the difference (since QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the number of top-level expression types that clients need to cope with, brings the implementation of DeclRefExpr into line with MemberExpr, and simplifies and unifies our handling of declaration references. Extended DeclRefExpr to (optionally) store explicitly-specified template arguments. This occurs when naming a declaration via a template-id (which will be stored in a TemplateIdRefExpr) that, following template argument deduction and (possibly) overload resolution, is replaced with a DeclRefExpr that refers to a template specialization but maintains the template arguments as written. llvm-svn: 84962
* Use CK_BitCast for member function pointer casts. Fixes PR5138.Anders Carlsson2009-10-181-1/+5
| | | | llvm-svn: 84438
* fix test/CodeGen/statements.c on 32-bit hosts.Chris Lattner2009-10-131-1/+12
| | | | llvm-svn: 84039
* Simplify pointer creation with the new Type::getInt*Ptr methods.Benjamin Kramer2009-10-131-2/+1
| | | | llvm-svn: 83964
* Teach sema and codegen about the difference between address of labels,Chris Lattner2009-10-131-1/+22
| | | | | | | | | | which is a common idiom to improve PIC'ness of code using the addr of label extension. This implementation is a gross hack, but the only other alternative would be to teach evalutate about this horrid combination. While GCC allows things like "&&foo - &&bar + 1", people don't use this in practice. This implements PR5131. llvm-svn: 83957
* Move the vtable builder to CGVtable.cpp, general cleanup.Anders Carlsson2009-10-111-1/+1
| | | | llvm-svn: 83798
* Pass the canonical method decl to GetVtableIndex. Fixes PR5120.Anders Carlsson2009-10-031-1/+1
| | | | llvm-svn: 83272
* Handle base-to-derived casts of member function pointers in CGExprConstant.cppAnders Carlsson2009-10-031-0/+37
| | | | llvm-svn: 83265
* Handle members to function pointers in CGExprConstant.Anders Carlsson2009-10-031-0/+43
| | | | llvm-svn: 83264
* Don't update the struct alignment when adding fields to a packed struct. ↵Anders Carlsson2009-10-021-1/+6
| | | | | | Fixes PR5118. llvm-svn: 83235
* When building constant structs, check if the resulting LLVM struct will be ↵Anders Carlsson2009-10-021-38/+59
| | | | | | bigger than the record layout size and use a packed struct if that's the case. Fixes PR5108. llvm-svn: 83230
* Improve support for member function pointers.Anders Carlsson2009-09-291-2/+9
| | | | llvm-svn: 83039
* Make clang stop relying on ConstantStruct::get's default value for isPackedNick Lewycky2009-09-191-2/+4
| | | | | | which will be going away (ie. it's becoming a required parameter) later today. llvm-svn: 82323
* GlobalDecl doesn't have an explicit constructor anymore.Anders Carlsson2009-09-101-1/+1
| | | | llvm-svn: 81481
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-135/+135
| | | | llvm-svn: 81346
* Make address-space qualification work correctly for compound literals. Eli Friedman2009-08-261-2/+3
| | | | | | | | | | Issue reported on cfe-dev. Also fixed the code to use isConstant to determine whether to generate a constant global, to be consistent with CodeGenModule. This probably needs to be refactored to deal with C++, though. llvm-svn: 80131
* More member pointer work.Anders Carlsson2009-08-241-5/+11
| | | | llvm-svn: 79922
* Whoops, comment this out for now. I'll fix it shortly.Anders Carlsson2009-08-231-0/+2
| | | | llvm-svn: 79806
* More work towards zero-initializing structs that contain member pointers in ↵Anders Carlsson2009-08-231-0/+8
| | | | | | constant expressions. llvm-svn: 79805
* Handle CK_NullToMemberPointer casts in the constant expr emitter.Anders Carlsson2009-08-231-0/+2
| | | | llvm-svn: 79790
* Change the constant expression emitter to look at the cast kind for to-union ↵Anders Carlsson2009-08-221-14/+19
| | | | | | casts. llvm-svn: 79789
* Update for LLVM API change.Owen Anderson2009-08-131-11/+14
| | | | llvm-svn: 78946
* Improve handling of member pointers.Anders Carlsson2009-08-091-2/+22
| | | | llvm-svn: 78536
* Fix clang breakage, CGF can be null in this context.Daniel Dunbar2009-08-061-1/+1
| | | | llvm-svn: 78269
* Update for LLVM API change.Owen Anderson2009-08-051-5/+8
| | | | llvm-svn: 78259
* use CodeGenModule::EmitNullConstant in a couple of places.Anders Carlsson2009-08-021-1/+1
| | | | llvm-svn: 77915
* Fix a minor issue with unions in the new struct building code.Eli Friedman2009-08-011-2/+5
| | | | llvm-svn: 77829
* Remove the old struct builder code.Anders Carlsson2009-07-311-177/+1
| | | | llvm-svn: 77738
* Move code from EmitUnion directly into the function that handles cast-to-union.Anders Carlsson2009-07-311-2/+28
| | | | llvm-svn: 77735
* Use the struct builder for unions.Anders Carlsson2009-07-311-0/+2
| | | | llvm-svn: 77732
* Update for LLVM API change.Owen Anderson2009-07-311-9/+9
| | | | llvm-svn: 77722
* Update for LLVM API change.Owen Anderson2009-07-291-8/+8
| | | | llvm-svn: 77514
* Change uses of:Ted Kremenek2009-07-291-3/+3
| | | | | | | | | | | | | | | | | | | | Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. llvm-svn: 77510
* Update for LLVM API change.Owen Anderson2009-07-291-12/+12
| | | | llvm-svn: 77492
OpenPOWER on IntegriCloud