aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ExprConstant.cpp
AgeCommit message (Collapse)Author
2008-10-06Move folding of __builtin_classify_type out of the CallExprChris Lattner
interface into the constant folding interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57158 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06Move handling of __builtin_nan("") out of CGBuiltin.cpp into ExprConstant.cppChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57157 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06Teach FloatExprEvaluator to evaluate __builtin_huge_val and inf.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57154 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06Add a comment that describes tryEvaluate. Make tryEvaluate foldChris Lattner
__builtin_constant_p properly, and add some scaffolding for FloatExprEvaluator to eventually handle huge_val and inf. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57152 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-22Initial implementation of floats in Expr::tryEvaluate; this doesn't Eli Friedman
implement some things, like unary operators and casts, but it's enough to fix PR2703 as filed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55155 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-18Add ExplicitCastExpr to replace the current CastExpr, and have ↵Argyrios Kyrtzidis
ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr): Expr -> CastExpr -> ExplicitCastExpr -> ImplicitCastExpr git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54955 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11More #include cleaningDaniel Dunbar
- Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10Remove the old evaluator code.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-09Turn on the new constant expression evaluator; it isn't Eli Friedman
anywhere near complete, but I don't know of any issues, and it can handle enough to allow removing the I-C-E pointer cast hack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54597 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-27Minor tweak plus a couple of FIXMEs.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54119 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-12expand casts to handle what isIntegerConstantExpr handles.Chris Lattner
Casts from pointers remain a problem. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53501 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-12Add support for __builtin_type_compatible_p, enums, etc.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53500 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-12start remembering diagnostics for various cases, add some missingChris Lattner
code. Switch to Eli's getIntWidth method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53499 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11Provide a structure for passing down 'is evaluated' and passing up Chris Lattner
diagnosic+loc info for i-c-e evaluation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53490 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11simplify some code a bit.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53477 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11share code between sizeof(expr) and sizeof(type)Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53475 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11implement support for __extension__, make sure the result of aChris Lattner
comparison has the right width. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53469 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11add a new getIntTypeSizeInBits method.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53468 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11rename "SInt" methods to "Int" in APValue.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53467 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11make the new evaluator avoid conversions APValue<->APSInt in some cases.Chris Lattner
Add some accessors to APValue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53465 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11rearrange some code, no functionality changes.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53463 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08Fix small bug. The evaluator now works well enough to pass all testsAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53238 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08More constant expression work.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53235 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08Move out some methods.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53234 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08More work.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53233 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08Compilation fixSeo Sanghyeon
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53222 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08Port more of Eli's evaluator over. This makes the int evaluator handle ↵Anders Carlsson
binary and unary operators. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53221 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08Commit beginnings of int evaluator. Currently not used.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53219 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03Shuffle things around in preparation for integrating Eli's constant evaluator.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53074 91177308-0d34-0410-b5e6-96231b3b80d8