summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
Commit message (Collapse)AuthorAge
* Get rid of more dead code.Eli Friedman2010-01-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92439 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some dead variables clang-analyzer found.Benjamin Kramer2009-12-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove ';' after method definition. Noticed by clang++, which one would thinkDaniel Dunbar2009-12-19
| | | | | | | would have a higher respect for its own code. This is getting old, is this warning really adding value? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91779 91177308-0d34-0410-b5e6-96231b3b80d8
* It's perfectly fine to see UserDefinedConversion casts when emitting scalar ↵Anders Carlsson2009-12-18
| | | | | | expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91686 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement additional undefined checks for additional loads and stores. WIP.Mike Stump2009-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91498 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch codegen for -fcatch-undefined-bahavior over to __builtin_trapMike Stump2009-12-15
| | | | | | | instead of abort to improve codesize and codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91374 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for detecting undefined shift behavior. WIP.Mike Stump2009-12-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91341 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch to allow C-style cast from 'void *' to block pointer type.Fariborz Jahanian2009-12-11
| | | | | | | | (fixes radar 7465023). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91171 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the code for converting a member pointer to a bool so that it is usableEli Friedman2009-12-11
| | | | | | | | for logical not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91112 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR5718: implement equality comparisons for member function pointers.Eli Friedman2009-12-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91108 91177308-0d34-0410-b5e6-96231b3b80d8
* Support unary type traits in a scalar context. Not that I've actually seenEli Friedman2009-12-10
| | | | | | | | this construct, but might as well for completeness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91071 91177308-0d34-0410-b5e6-96231b3b80d8
* Code gen for ObjCIsaExpr AST used as lvalue.Fariborz Jahanian2009-12-09
| | | | | | | | (fixes radar 7457534). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90995 91177308-0d34-0410-b5e6-96231b3b80d8
* Codegen. support for ObjCIsaExpr AST which until nowFariborz Jahanian2009-12-09
| | | | | | | | was not needed (fixes radar 7453430). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90981 91177308-0d34-0410-b5e6-96231b3b80d8
* More detailed analysis of typecast to an objective-c pointerFariborz Jahanian2009-12-08
| | | | | | | in objective-c++ mode without being too lenient. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90895 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly handle conditional operators involving throw.Eli Friedman2009-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90800 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't pass false (default) for isVolatile parameter to CreateLoad.Daniel Dunbar2009-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90098 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.Benjamin Kramer2009-11-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90044 91177308-0d34-0410-b5e6-96231b3b80d8
* More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, eitherEli Friedman2009-11-27
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89987 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup for ScalarExprEmitter::EmitCastExpr; no functional changes.Eli Friedman2009-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89986 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the more general Evaluate infrastructure for folding constant DeclRefsEli Friedman2009-11-26
| | | | | | | | | | | | | | | 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++.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89934 91177308-0d34-0410-b5e6-96231b3b80d8
* We always need to emit the base expression of a member expression, even when ↵Anders Carlsson2009-11-24
| | | | | | the member decl refers to an enum. Thanks to Eli for pointing this out! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89775 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to treat an enum constant as an lvalue.Anders Carlsson2009-11-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89705 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle converting member pointers to bool.Anders Carlsson2009-11-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89692 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle base-to-derived casts. Will land test case shortly.Anders Carlsson2009-11-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89678 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix lifetime of conditional temporaries. Patch by Victor Zverovich!Anders Carlsson2009-11-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89467 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup to member pointer handling.Eli Friedman2009-11-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89201 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up scalar cast kind handling; make cast kind handling explicitly handleEli Friedman2009-11-16
| | | | | | | | more cases. No intended visible change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88968 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement most of dynamic_cast. WIP.Mike Stump2009-11-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88901 91177308-0d34-0410-b5e6-96231b3b80d8
* indirectbr seems to work! Rip out the old code.Chris Lattner2009-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86256 91177308-0d34-0410-b5e6-96231b3b80d8
* Refine volatile handling, specifically, we must have the canonicalMike Stump2009-11-03
| | | | | | | | type to look at the volatile specifier. I found these all from just hand auditing the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85967 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CGException.cpp, to be used for exception related code generation.Anders Carlsson2009-10-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85560 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement clang support for indirect branch and address of labelChris Lattner2009-10-28
| | | | | | | | | | 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" :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85446 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in calculating shufflevector indices when constructing vectors ↵Nate Begeman2009-10-25
| | | | | | | | | from other vectors. If I can find it again, I will check in a testcase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85032 91177308-0d34-0410-b5e6-96231b3b80d8
* Complete code gen for '.*' binary expression forFariborz Jahanian2009-10-22
| | | | | | | | both scalar and aggregates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84910 91177308-0d34-0410-b5e6-96231b3b80d8
* Canonicality is a property of qualified types, not unqualified types.John McCall2009-10-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84891 91177308-0d34-0410-b5e6-96231b3b80d8
* Code gen for '.*' binary expressions - WIP.Fariborz Jahanian2009-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84800 91177308-0d34-0410-b5e6-96231b3b80d8
* Support IRgen of OpenCL vector initializers, ensuring the resulting IR is in aNate Begeman2009-10-18
| | | | | | | | | form that LLVM code generators can turn into efficient code. For example, int4 a, b, c; a = (int4)(b.yzw, a.x) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84434 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some more cast kinds.Anders Carlsson2009-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84423 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5211: codegen shouldn't assume that the result of ||/&& is int Chris Lattner2009-10-17
| | | | | | | anymore. In C++ it is bool. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84308 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify pointer creation with the new Type::getInt*Ptr methods.Benjamin Kramer2009-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83964 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate weak read barriers when reading a weak __blockFariborz Jahanian2009-10-10
| | | | | | | | variable inside the block. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83729 91177308-0d34-0410-b5e6-96231b3b80d8
* Use new predicates for some type equality tests.Benjamin Kramer2009-10-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83303 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the representation of qualifiers to bring ExtQualType out of theJohn McCall2009-09-24
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove now fixed FIXME.Mike Stump2009-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82584 91177308-0d34-0410-b5e6-96231b3b80d8
* No need to null check implicit lvalue cast exprs.Anders Carlsson2009-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82580 91177308-0d34-0410-b5e6-96231b3b80d8
* Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall2009-09-21
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle reinterpret_cast between integral types and pointer types.Anders Carlsson2009-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81837 91177308-0d34-0410-b5e6-96231b3b80d8
* Codegen support for nullptr from C++0x.Anders Carlsson2009-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81835 91177308-0d34-0410-b5e6-96231b3b80d8
* When necessary, null check the base value in GetAddressCXXOfBaseClass.Anders Carlsson2009-09-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81611 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle derived-to-base conversion in CGExprScalar::EmitCast, if the cast ↵Anders Carlsson2009-09-12
| | | | | | kind is CK_DerivedToBase. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81610 91177308-0d34-0410-b5e6-96231b3b80d8