summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGExprScalar.cpp
AgeCommit message (Collapse)Author
2009-12-07Correctly handle conditional operators involving throw.Eli Friedman
llvm-svn: 90800
2009-11-29Don't pass false (default) for isVolatile parameter to CreateLoad.Daniel Dunbar
llvm-svn: 90098
2009-11-28Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.Benjamin Kramer
llvm-svn: 90044
2009-11-27More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, eitherEli Friedman
implement it explicitly or assert that it doesn't make sense for a scalar. This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer casts were getting silently miscompiled, and two, Sema was constructing some strange implicit casts of type CK_UserDefinedConversion. The change in SemaExprCXX makes sure the cast kinds are getting set correctly. llvm-svn: 89987
2009-11-27Cleanup for ScalarExprEmitter::EmitCastExpr; no functional changes.Eli Friedman
llvm-svn: 89986
2009-11-26Use the more general Evaluate infrastructure for folding constant DeclRefsEli Friedman
instead of checking explicitly for an EnumConstantDecl. This folds references to constant integer VarDecls, which has two benefits: 1. Slightly smaller emitted code from emitting a constant instead of a load, and skipping emitting some constant globals. 2. Some code forgets to define static constant member variables; emitting a load instead of the value in that case leads to a link error. (Such programs are technically not well-formed, but in practice build with g++.) llvm-svn: 89934
2009-11-24We always need to emit the base expression of a member expression, even when ↵Anders Carlsson
the member decl refers to an enum. Thanks to Eli for pointing this out! llvm-svn: 89775
2009-11-23Don't try to treat an enum constant as an lvalue.Anders Carlsson
llvm-svn: 89705
2009-11-23Handle converting member pointers to bool.Anders Carlsson
llvm-svn: 89692
2009-11-23Handle base-to-derived casts. Will land test case shortly.Anders Carlsson
llvm-svn: 89678
2009-11-20Fix lifetime of conditional temporaries. Patch by Victor Zverovich!Anders Carlsson
llvm-svn: 89467
2009-11-18Minor cleanup to member pointer handling.Eli Friedman
llvm-svn: 89201
2009-11-16Clean up scalar cast kind handling; make cast kind handling explicitly handleEli Friedman
more cases. No intended visible change. llvm-svn: 88968
2009-11-16Implement most of dynamic_cast. WIP.Mike Stump
llvm-svn: 88901
2009-11-06indirectbr seems to work! Rip out the old code.Chris Lattner
llvm-svn: 86256
2009-11-03Refine volatile handling, specifically, we must have the canonicalMike Stump
type to look at the volatile specifier. I found these all from just hand auditing the code. llvm-svn: 85967
2009-10-30Add CGException.cpp, to be used for exception related code generation.Anders Carlsson
llvm-svn: 85560
2009-10-28Implement clang support for indirect branch and address of labelChris Lattner
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
2009-10-25Fix a bug in calculating shufflevector indices when constructing vectors ↵Nate Begeman
from other vectors. If I can find it again, I will check in a testcase. llvm-svn: 85032
2009-10-22Complete code gen for '.*' binary expression forFariborz Jahanian
both scalar and aggregates. llvm-svn: 84910
2009-10-22Canonicality is a property of qualified types, not unqualified types.John McCall
llvm-svn: 84891
2009-10-21Code gen for '.*' binary expressions - WIP.Fariborz Jahanian
llvm-svn: 84800
2009-10-18Support IRgen of OpenCL vector initializers, ensuring the resulting IR is in aNate Begeman
form that LLVM code generators can turn into efficient code. For example, int4 a, b, c; a = (int4)(b.yzw, a.x) llvm-svn: 84434
2009-10-18Add some more cast kinds.Anders Carlsson
llvm-svn: 84423
2009-10-17Fix PR5211: codegen shouldn't assume that the result of ||/&& is int Chris Lattner
anymore. In C++ it is bool. llvm-svn: 84308
2009-10-13Simplify pointer creation with the new Type::getInt*Ptr methods.Benjamin Kramer
llvm-svn: 83964
2009-10-10Generate weak read barriers when reading a weak __blockFariborz Jahanian
variable inside the block. llvm-svn: 83729
2009-10-05Use new predicates for some type equality tests.Benjamin Kramer
llvm-svn: 83303
2009-09-24Refactor the representation of qualifiers to bring ExtQualType out of theJohn McCall
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our use of qualifiers and fix a few places that weren't dealing with qualifiers quite right; many more remain. llvm-svn: 82705
2009-09-22Remove now fixed FIXME.Mike Stump
llvm-svn: 82584
2009-09-22No need to null check implicit lvalue cast exprs.Anders Carlsson
llvm-svn: 82580
2009-09-21Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall
Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. llvm-svn: 82501
2009-09-15Handle reinterpret_cast between integral types and pointer types.Anders Carlsson
llvm-svn: 81837
2009-09-15Codegen support for nullptr from C++0x.Anders Carlsson
llvm-svn: 81835
2009-09-12When necessary, null check the base value in GetAddressCXXOfBaseClass.Anders Carlsson
llvm-svn: 81611
2009-09-12Handle derived-to-base conversion in CGExprScalar::EmitCast, if the cast ↵Anders Carlsson
kind is CK_DerivedToBase. llvm-svn: 81610
2009-09-12Rename AddressCXXOfBaseClass to GetAddressCXXOfBaseClass. Add a ↵Anders Carlsson
NullCheckValue argument (currently unused). llvm-svn: 81606
2009-09-09If a cast expression needs either a conversion function or a constructor to ↵Anders Carlsson
be called, generate implicit child expressions that call them. llvm-svn: 81383
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
llvm-svn: 81346
2009-09-09Reflow comments and some minor whitespace fixups.Mike Stump
llvm-svn: 81337
2009-09-04Implement AST, semantics, and CodeGen for C++ pseudo-destructorDouglas Gregor
expressions, e.g., p->~T() when p is a pointer to a scalar type. We don't currently diagnose errors when pseudo-destructor expressions are used in any way other than by forming a call. llvm-svn: 81009
2009-09-01Use the correct cast kinds for bit casts and function to pointer decay. ↵Anders Carlsson
Fixes PR4827. llvm-svn: 80720
2009-08-29Patch for code gen. for c-style cast which ends inFariborz Jahanian
using class's conversion functions [12.3.2-p2] llvm-svn: 80433
2009-08-26ir-gen for type convesion of class objects. WIP.Fariborz Jahanian
llvm-svn: 80178
2009-08-24Handle array to pointer decay in EmitCastExpr and get rid of ↵Anders Carlsson
VisitImplicitCastExpr. llvm-svn: 79930
2009-08-24Handle CK_NullToMemberPointer in ScalarExprEmitter::EmitCastAnders Carlsson
llvm-svn: 79929
2009-08-24Pass the cast kind to ScalarExprEmitter::EmitCastExpr.Anders Carlsson
llvm-svn: 79928
2009-08-20Using "ObjCImplicitSetterGetterRefExpr" instead of ↵Fariborz Jahanian
"ObjCImplctSetterGetterRefExpr". A field rename and more comments. llvm-svn: 79537
2009-08-18Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.Fariborz Jahanian
Removed an unnecessary loop to get to setters incoming argument. Added DoxyGen comments. Still more work to do in this area (WIP). llvm-svn: 79365
2009-08-16Improve handling of delete expressions.Anders Carlsson
llvm-svn: 79205