History log of /llvm-project-15.0.7/clang/lib/CodeGen/CGExprConstant.cpp (Results 401 – 425 of 479)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-2.5.0
# ed5e69fe 01-Mar-2009 Anders Carlsson <[email protected]>

Do some blocks cleanup and simplification. Fix a crash, and add a test case.

llvm-svn: 65746


# b750d928 25-Feb-2009 Mike Stump <[email protected]>

CodeGen support for copied BlockDeclRefExprs.

llvm-svn: 65487


# d7e7b8e4 24-Feb-2009 Chris Lattner <[email protected]>

first wave of fixes for @encode sema support. This is part of PR3648.

The big difference here is that (like string literal) @encode has
array type, not pointer type.

llvm-svn: 65391


# d4ecca13 24-Feb-2009 Daniel Dunbar <[email protected]>

Fix IRgen of constant expressions referring to external/static
variables.
- PR3657.

llvm-svn: 65381


# 825fe756 22-Feb-2009 Eli Friedman <[email protected]>

Eliminate a bunch of code which should be dead.

llvm-svn: 65267


# a6703329 19-Feb-2009 Mike Stump <[email protected]>

Add enough checking to ensure that non-constant block literals don't
appear to be constant. I'll probably redo this and throw it all away
later once we have codegen for BlockDeclRefExprs.

llvm-svn:

Add enough checking to ensure that non-constant block literals don't
appear to be constant. I'll probably redo this and throw it all away
later once we have codegen for BlockDeclRefExprs.

llvm-svn: 65070

show more ...


# 18e1444f 19-Feb-2009 Daniel Dunbar <[email protected]>

Remove IRgen constant emission assumption that LValue APValue results
only occur for pointer types; they are also possible for integer types
now.
- No intended functionality change, IntExprEvaluate

Remove IRgen constant emission assumption that LValue APValue results
only occur for pointer types; they are also possible for integer types
now.
- No intended functionality change, IntExprEvaluate doesn't return
LValue results yet.

llvm-svn: 65066

show more ...


# 5d2534ad 19-Feb-2009 Mike Stump <[email protected]>

More codegen for blocks. The type of block literals should be better.
The size calculation is improved.

llvm-svn: 64994


# 38ad1e61 17-Feb-2009 Daniel Dunbar <[email protected]>

Change EmitConstantExpr to allow failure.

IRgen no longer relies on isConstantInitializer, instead we just try
to emit the constant. If that fails then in C we emit an error
unsupported (this occurs

Change EmitConstantExpr to allow failure.

IRgen no longer relies on isConstantInitializer, instead we just try
to emit the constant. If that fails then in C we emit an error
unsupported (this occurs when Sema accepted something that it doesn't
know how to fold, and IRgen doesn't know how to emit) and in C++ we
emit a guarded initializer.

This ends up handling a few more cases, because IRgen was actually
able to emit some of the constants Sema accepts but can't Evaluate().
For example, PR3398.

llvm-svn: 64780

show more ...


# 2d5a2878 14-Feb-2009 Mike Stump <[email protected]>

Generate the helper function for blocks. Now basic codegen is
starting to work for blocks.

llvm-svn: 64570


# e711f705 14-Feb-2009 Douglas Gregor <[email protected]>

Add hook to add attributes to function declarations that we know
about, whether they are builtins or not. Use this to add the
appropriate "format" attribute to NSLog, NSLogv, asprintf, and
vasprintf,

Add hook to add attributes to function declarations that we know
about, whether they are builtins or not. Use this to add the
appropriate "format" attribute to NSLog, NSLogv, asprintf, and
vasprintf, and to translate builtin attributes (from Builtins.def)
into actual attributes on the function declaration.

Use the "printf" format attribute on function declarations to
determine whether we should do format string checking, rather than
looking at an ad hoc list of builtins and "known" function names.

Be a bit more careful about when we consider a function a "builtin" in
C++.

llvm-svn: 64561

show more ...


# 6a60fa24 12-Feb-2009 Anders Carlsson <[email protected]>

Add a very basic implemenation of global blocks. This needs to be cleaned up.

llvm-svn: 64387


# 6ec47f0d 11-Feb-2009 Douglas Gregor <[email protected]>

Silence a warning about an unused variable in -Asserts builds

llvm-svn: 64306


# 1f90fe17 01-Feb-2009 Eli Friedman <[email protected]>

Fix for PR3447: use padded sizes for computations on struct/union
constants.

llvm-svn: 63491


# 02714ed3 30-Jan-2009 Anders Carlsson <[email protected]>

Implement constant generation of ImplicitValueInitExprs.

llvm-svn: 63379


# 0202cb40 29-Jan-2009 Douglas Gregor <[email protected]>

Introduce a new expression node, ImplicitValueInitExpr, that
represents an implicit value-initialization of a subobject of a
particular type. This replaces the (ab)use of CXXZeroValueInitExpr
within

Introduce a new expression node, ImplicitValueInitExpr, that
represents an implicit value-initialization of a subobject of a
particular type. This replaces the (ab)use of CXXZeroValueInitExpr
within initializer lists for the "holes" that occur due to the use of
C99 designated initializers.

The new test case is currently XFAIL'd, because CodeGen's
ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be
taught to value-initialize when it sees ImplicitValueInitExprs.

llvm-svn: 63317

show more ...


# 5169570e 29-Jan-2009 Douglas Gregor <[email protected]>

Clean up designated initialization of unions, so that CodeGen doesn't
have to try to guess which member is being initialized.

llvm-svn: 63315


# 17bd094a 28-Jan-2009 Douglas Gregor <[email protected]>

Improvements to code-generation and semantic analysis of designated
initializers.

- We now initialize unions properly when a member other than the
first is named by a designated initializer.

Improvements to code-generation and semantic analysis of designated
initializers.

- We now initialize unions properly when a member other than the
first is named by a designated initializer.
- We now provide proper semantic analysis and code generation for
GNU array-range designators *except* that side effects will occur
more than once. We warn about this.

llvm-svn: 63253

show more ...


# f50e60b2 28-Jan-2009 Daniel Dunbar <[email protected]>

Implement basic _Complex integer constant folding.
- Merged into single ComplexEvaluator, these share too much logic to
be worth splitting for float/int (IMHO). Will split on request.

llvm-svn:

Implement basic _Complex integer constant folding.
- Merged into single ComplexEvaluator, these share too much logic to
be worth splitting for float/int (IMHO). Will split on request.

llvm-svn: 63248

show more ...


# 347f7eab 28-Jan-2009 Douglas Gregor <[email protected]>

Code generation support for C99 designated initializers.

The approach I've taken in this patch is relatively straightforward,
although the code itself is non-trivial. Essentially, as we process
an i

Code generation support for C99 designated initializers.

The approach I've taken in this patch is relatively straightforward,
although the code itself is non-trivial. Essentially, as we process
an initializer list we build up a fully-explicit representation of the
initializer list, where each of the subobject initializations occurs
in order. Designators serve to "fill in" subobject initializations in
a non-linear way. The fully-explicit representation makes initializer
lists (both with and without designators) easy to grok for codegen and
later semantic analyses. We keep the syntactic form of the initializer
list linked into the AST for those clients interested in exactly what
the user wrote.

Known limitations:
- Designating a member of a union that isn't the first member may
result in bogus initialization (we warn about this)
- GNU array-range designators are not supported (we warn about this)

llvm-svn: 63242

show more ...


# cf2b7ba4 25-Jan-2009 Eli Friedman <[email protected]>

Get rid of some code that should be unnecessary.

llvm-svn: 62950


# c69d454d 25-Jan-2009 Eli Friedman <[email protected]>

Make the constant folder aware of
__builtin___CFStringMakeConstantString. (We get into trouble in
GenerateStaticBlockVarDecl if the constant folder isn't accurate.)

llvm-svn: 62949


# 529a99bc 25-Jan-2009 Eli Friedman <[email protected]>

Fix the address of a label to be properly considered and emitted as a
constant.

llvm-svn: 62948


# 096d3ecb 24-Jan-2009 Chris Lattner <[email protected]>

remove dead code.

llvm-svn: 62930


# 1e31b168 18-Jan-2009 Nate Begeman <[email protected]>

Add support for vectors to APValue. Vector constant evaluator and tests coming.

llvm-svn: 62438


1...<<11121314151617181920