summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Modified DeclGroupRef to always load/store the internal pointer value as ↵Ted Kremenek2008-10-062-20/+25
| | | | | | Decl*. This hopefully will obviate any concerns with violating strict type-aliasing issues. llvm-svn: 57213
* Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when ↵Ted Kremenek2008-10-061-2/+3
| | | | | | rewriting Objective-c foreach statements. llvm-svn: 57212
* Set UNIVERSAL_ARCH value.Devang Patel2008-10-061-1/+2
| | | | | | Fixes build failure when target is i386. llvm-svn: 57211
* Fix PR2850 and PR2863. Only generate movddup for 128-bit SSE vector shuffles.Evan Cheng2008-10-062-0/+13
| | | | llvm-svn: 57210
* Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when ↵Ted Kremenek2008-10-061-3/+3
| | | | | | processing the Decl of an Objective-C foreach statement. llvm-svn: 57209
* Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when ↵Ted Kremenek2008-10-061-1/+1
| | | | | | processing the Decl of a @catch statement. llvm-svn: 57208
* When processing Objective-C foreach statements, first check to see if the ↵Ted Kremenek2008-10-061-4/+6
| | | | | | statement has a DeclStmt with a single Decl. Afterwards, use DeclStmt::getSolitaryDecl() to access that Decl (thus avoiding an assertion being triggered). These changes remove an unneeded use of ScopedDecl::getNextDeclarator() and DeclStmt::getDecl(). llvm-svn: 57207
* Use DeclStmt::decl_iterator to walk a group of Decl*'s instead of using the ↵Ted Kremenek2008-10-061-8/+12
| | | | | | ScopedDecl chain. llvm-svn: 57206
* Don't use DeclStmt::getDecl() to serialize out DeclStmt; use TheDecl directly.Ted Kremenek2008-10-061-1/+1
| | | | | | This patch precedes removing getDecl() DeclStmt::entirely. llvm-svn: 57205
* Add DeclStmt::hasSolitaryDecl() and DeclStmt::getSolitaryDecl()Ted Kremenek2008-10-062-1/+22
| | | | llvm-svn: 57204
* Temporarily revert functionality change from my previous patch;Dale Johannesen2008-10-061-2/+1
| | | | | | it is too aggressive. llvm-svn: 57203
* Remove interfaces implemented by dead pass from the list of available passes.Devang Patel2008-10-062-7/+28
| | | | | | Patch By Matthijs Kooijman. llvm-svn: 57202
* Use "unsigned" instead of "int" for i to remove a "comparison between ↵Ted Kremenek2008-10-061-1/+1
| | | | | | unsigned and signed" warning (potential integer overflow). llvm-svn: 57201
* Cosmetic.Evan Cheng2008-10-061-1/+1
| | | | llvm-svn: 57200
* Add 'x' constraint character.Anders Carlsson2008-10-061-0/+1
| | | | llvm-svn: 57198
* Update function attributes docs.Devang Patel2008-10-061-9/+37
| | | | llvm-svn: 57197
* Use the DeclStmt::decl_iterator to get the first decl in a DeclStmt instead ↵Ted Kremenek2008-10-061-1/+1
| | | | | | of using DeclStmt::getDecl(). llvm-svn: 57196
* In RewriteFunctionBody, using DeclStmt::decl_iterator to rewrite the Decls ↵Ted Kremenek2008-10-061-8/+12
| | | | | | | in a DeclStmt instead of using getDecl() to fetch the first Decl. Steve: Please review this patch. 'make test' passes, and my cursory scan of the rewriter leads me to believe this doesn't break anything, but I'm not sure. llvm-svn: 57195
* Don't use DeclStmt::getDecl(); this will eventually disappear. Just fetch ↵Ted Kremenek2008-10-061-4/+2
| | | | | | the first decl using the DeclStmt::decl_iterator. llvm-svn: 57194
* This is an objective-c test, not an objective-c++ one.Evan Cheng2008-10-061-1/+1
| | | | llvm-svn: 57193
* In EmitDeclStmt: use DeclStmt::const_decl_iterator instead of walking the ↵Ted Kremenek2008-10-061-3/+3
| | | | | | scoped decl chain. llvm-svn: 57192
* Added PrintRawDeclStmt; use this method to print out DeclStmt instead of ↵Ted Kremenek2008-10-061-5/+19
| | | | | | using PrintRawDecl (which falsely assumes DeclStmts have only one Decl). llvm-svn: 57191
* Use Decl::decl_iterator instead of walking the ScopedDecl chain (which will ↵Ted Kremenek2008-10-061-1/+3
| | | | | | soon be removed). llvm-svn: 57190
* Use DeclStmt::decl_iterator instead of using Decl::getDecl(). Soon ↵Ted Kremenek2008-10-061-2/+6
| | | | | | | | DeclStmts will wrap group of Decls. Added FIXME. llvm-svn: 57189
* The current semantic process for direct initializers won't work properly for ↵Argyrios Kyrtzidis2008-10-061-21/+13
| | | | | | | | class types. Add a FIXME until class constructors are supported. llvm-svn: 57188
* Use DeclStmt::decl_iterator instead of walking the ScopedDecl chain (which ↵Ted Kremenek2008-10-061-1/+3
| | | | | | will soon be removed). llvm-svn: 57187
* Add const_decl_iterator to DecStmt.Ted Kremenek2008-10-061-0/+23
| | | | llvm-svn: 57186
* Mark shortening NaN conversions as Inexact. PR 2856.Dale Johannesen2008-10-061-6/+9
| | | | | | Improve description of unsupported formats. llvm-svn: 57185
* It is possible that all functions in one module are not being Devang Patel2008-10-061-5/+2
| | | | | | optimized for size. Set OptForSize for each function separately. llvm-svn: 57182
* Don't dereference the end() iterator. Thanks toDan Gohman2008-10-061-1/+1
| | | | | | ENABLE_EXPENSIVE_CHECKS for finding this. llvm-svn: 57181
* Update Xcode project.Ted Kremenek2008-10-061-0/+18
| | | | llvm-svn: 57180
* Remove unncessary isDeclaration() checks.Devang Patel2008-10-063-3/+3
| | | | llvm-svn: 57179
* Implement support for C++ direct initializers in declarations, e.g. "int x(1);".Argyrios Kyrtzidis2008-10-068-5/+184
| | | | | | | | | | | | | | | This is how this kind of initializers appear in the AST: -The Init expression of the VarDecl is a functional type construction (of the VarDecl's type). -The new VarDecl::hasCXXDirectInitializer() returns true. e.g, for "int x(1);": -VarDecl 'x' has Init with expression "int(1)" (CXXFunctionalCastExpr). -hasCXXDirectInitializer() of VarDecl 'x' returns true. A major benefit is that clients that don't particularly care about which exactly form was the initializer can handle both cases without special case code. Note that codegening works now for "int x(1);" without any changes to CodeGen. llvm-svn: 57178
* Allow scalarrepl to treat an all-zero GEP just as bitcast.Matthijs Kooijman2008-10-062-14/+52
| | | | | | | This includes not marking a GEP involving a vector as unsafe, but only when it has all zero indices. This allows scalarrepl to work in a few more cases. llvm-svn: 57177
* Updated checker build.Ted Kremenek2008-10-061-1/+1
| | | | llvm-svn: 57176
* Actually run Obj-C++ tests if llvm-gcc supports.Duncan Sands2008-10-063-3/+3
| | | | | | | | | | | Before there were two problems: (1) configure turned "obj-c++" into "obj" in the langs line; (2) the dejagnu library called it objc++ not obj-c++. Now the problem is that some of these tests don't pass! llvm-svn: 57167
* Clarify the relationship between byval and readonly/Duncan Sands2008-10-061-15/+20
| | | | | | | | | | readnone. Make clearer that readnone functions do not dereference pointer arguments. Do not use the highly ambiguous "side-effects" in the readonly description (since such functions can have control flow side-effects, such as throwing an exception, or looping for ever). llvm-svn: 57166
* fix incorrect rdar number.Chris Lattner2008-10-061-1/+1
| | | | llvm-svn: 57165
* __CONSTANT_CFSTRINGS__ should be defined even in C mode, otherwise the CFSTRChris Lattner2008-10-062-4/+17
| | | | | | won't expand to the builtin. This fixes rdar://6248329 llvm-svn: 57164
* Make sema and codegen allow __builtin___CFStringMakeConstantString as a validChris Lattner2008-10-064-21/+37
| | | | | | | constant lvalue. Implement this in codegen by moving the code out of CGBuiltin into EmitConstantExpr. llvm-svn: 57163
* ExprConstant should not abort when it sees a pointer constant that isn't.Chris Lattner2008-10-061-3/+0
| | | | llvm-svn: 57162
* always try to fold a builtin before emitting it. In the futureChris Lattner2008-10-061-18/+5
| | | | | | | it is possible that a builtin could sometimes be folded (e.g. __builtin_clz) if it's operand is a constant. llvm-svn: 57161
* Remove the 'C' / isConstantExpr flag on builtins. Code should neverChris Lattner2008-10-062-16/+9
| | | | | | | depend on the value of this flag, it should depend on whether tryEvaluate is able to *actually* fold a builtin. llvm-svn: 57160
* Add a Expr::isEvaluatable method, eliminate isBuiltinConstantExprChris Lattner2008-10-064-21/+20
| | | | | | | which is checking for something that can be inconsistent with what we can constant fold. llvm-svn: 57159
* Move folding of __builtin_classify_type out of the CallExprChris Lattner2008-10-063-65/+70
| | | | | | interface into the constant folding interface. llvm-svn: 57158
* Move handling of __builtin_nan("") out of CGBuiltin.cpp into ExprConstant.cppChris Lattner2008-10-062-18/+19
| | | | llvm-svn: 57157
* remove some code where CGBuiltin folds constants, and use tryEvaluate toChris Lattner2008-10-061-22/+19
| | | | | | | do it instead. We should still handle __builtin_nan etc, but don't yet. This fixes incorrect evaluation of __builtin_constant_p, a FIXME. llvm-svn: 57156
* instead of making codegen try to know about all of the builtins to generateChris Lattner2008-10-061-23/+8
| | | | | | | constants for them, just use the constant evaluator to do the job. This also fixes crashes on 'unknown constant builtins'. llvm-svn: 57155
* Teach FloatExprEvaluator to evaluate __builtin_huge_val and inf.Chris Lattner2008-10-061-3/+5
| | | | llvm-svn: 57154
* "Enhance" CheckArithmeticConstantExpression to accept ?: with a constant Chris Lattner2008-10-063-20/+50
| | | | | | | | | | | | | | | condition as a constant even if the unevaluated side is a not a constant. We don't do this when extensions are off, and we emit a warning when this happens: t.c:22:11: warning: expression is not a constant, but is accepted as one by GNU extensions short t = __builtin_constant_p(5353) ? 42 : somefunc(); ^ ~~~~~~~~~~ suggestions for improvement are welcome. This is obviously horrible, but is required for real-world code. llvm-svn: 57153
OpenPOWER on IntegriCloud