History log of /llvm-project-15.0.7/clang/lib/CodeGen/CGExpr.cpp (Results 726 – 750 of 1262)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# cbc038a6 21-Sep-2011 John McCall <[email protected]>

ANSI C requires that a call to an unprototyped function type succeed
if the definition has a non-variadic prototype with compatible
parameters. Therefore, the default rule for such calls must be to

ANSI C requires that a call to an unprototyped function type succeed
if the definition has a non-variadic prototype with compatible
parameters. Therefore, the default rule for such calls must be to
use a non-variadic convention. Achieve this by casting the callee to
the function type with which it is required to be compatible, unless
the target specifically opts out and insists that unprototyped calls
should use the variadic rules. The only case of that I'm aware of is
the x86-64 convention, which passes arguments the same way in both
cases but also sets a small amount of extra information; here we seek
to maintain compatibility with GCC, which does set this when calling
an unprototyped function.

Addresses PR10810 and PR10713.

llvm-svn: 140241

show more ...


# 79a91418 13-Sep-2011 Douglas Gregor <[email protected]>

Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of an

Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.

AST serialization changes are next up.

llvm-svn: 139605

show more ...


# 2d637d2e 10-Sep-2011 John McCall <[email protected]>

Rename the ARC cast kinds to start with "ARC".

llvm-svn: 139466


# cd78e805 10-Sep-2011 John McCall <[email protected]>

When converting a block pointer to an Objective-C pointer type, extend
the lifetime of the block by copying it to the heap, or else we'll get
a dangling reference because the code working with the no

When converting a block pointer to an Objective-C pointer type, extend
the lifetime of the block by copying it to the heap, or else we'll get
a dangling reference because the code working with the non-block-typed
object will not know it needs to copy.

There is some danger here, e.g. with assigning a block literal to an
unsafe variable, but, well, it's an unsafe variable.

llvm-svn: 139451

show more ...


# 5a6b6987 09-Sep-2011 Julien Lerouge <[email protected]>

Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://80374

Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://8037476.

llvm-svn: 139423

show more ...


# 9320b87c 09-Sep-2011 John McCall <[email protected]>

Give conversions of block pointers to ObjC pointers a different cast kind
than conversions of C pointers to ObjC pointers. In order to ensure that
we've caught every case, add asserts to CastExpr th

Give conversions of block pointers to ObjC pointers a different cast kind
than conversions of C pointers to ObjC pointers. In order to ensure that
we've caught every case, add asserts to CastExpr that strictly determine
which cast kind is used for which kind of bit cast.

llvm-svn: 139352

show more ...


# d98e4247 08-Sep-2011 Eric Christopher <[email protected]>

Formatting.

llvm-svn: 139296


# e0e9630e 06-Sep-2011 Douglas Gregor <[email protected]>

When extracting the callee declaration from a call expression, be sure
to look through SubstNonTypeTemplateParmExprs. Then, update the IR
generation of CallExprs to actually use CallExpr::getCalleeDe

When extracting the callee declaration from a call expression, be sure
to look through SubstNonTypeTemplateParmExprs. Then, update the IR
generation of CallExprs to actually use CallExpr::getCalleeDecl()
rather than attempting to mimick its behavior (badly).

Fixes <rdar://problem/10063539>.

llvm-svn: 139185

show more ...


# 17054bd6 26-Aug-2011 John McCall <[email protected]>

Slight optimization enabled by the previous assert:
emit all gl-value arguments as reference bindings.

llvm-svn: 138655


# cac93853 26-Aug-2011 John McCall <[email protected]>

What say we document some of these AggValueSlot flags a bit
better.

llvm-svn: 138628


# a8a39bc3 26-Aug-2011 John McCall <[email protected]>

An initialization does not alias.

llvm-svn: 138624


# a5efa738 25-Aug-2011 John McCall <[email protected]>

Track whether an AggValueSlot is potentially aliased, and do not
emit call results into potentially aliased slots. This allows us
to properly mark indirect return slots as noalias, at the cost
of re

Track whether an AggValueSlot is potentially aliased, and do not
emit call results into potentially aliased slots. This allows us
to properly mark indirect return slots as noalias, at the cost
of requiring an extra memcpy when assigning an aggregate call
result into a l-value. It also brings us into compliance with
the x86-64 ABI.

llvm-svn: 138599

show more ...


# 8d6fc958 25-Aug-2011 John McCall <[email protected]>

Use stronger typing for the flags on AggValueSlot and require
creators to tell us whether something needs GC barriers.
No functionality change.

llvm-svn: 138581


# 0e62c1cc 23-Jul-2011 Chris Lattner <[email protected]>

remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.

llvm-svn: 135852


# 040dd82f 22-Jul-2011 Jay Foad <[email protected]>

Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
ArrayRef.

llvm-svn: 135761


# 24516962 20-Jul-2011 Chris Lattner <[email protected]>

as eli points out, we're not doing memory stuff here. While ConvertType
and ConvertTypeForMem are the same for pointers, it is best to just
use ConvertType. Thanks Eli!

llvm-svn: 135567


# 2192fe50 18-Jul-2011 Chris Lattner <[email protected]>

de-constify llvm::Type, patch by David Blaikie!

llvm-svn: 135370


# 7c454bb8 15-Jul-2011 John McCall <[email protected]>

Create a new expression node, SubstNonTypeTemplateParmExpr,
to represent a fully-substituted non-type template parameter.
This should improve source fidelity, as well as being generically
useful for

Create a new expression node, SubstNonTypeTemplateParmExpr,
to represent a fully-substituted non-type template parameter.
This should improve source fidelity, as well as being generically
useful for diagnostics and such.

llvm-svn: 135243

show more ...


# 8d375cef 14-Jul-2011 Benjamin Kramer <[email protected]>

Change intrinsic getter to take an ArrayRef, now that the underlying function in LLVM does.

llvm-svn: 135155


# ae2d3443 12-Jul-2011 Benjamin Kramer <[email protected]>

Add more compiler workarounds. Should fix the build with old GCCs and MSVC.

llvm-svn: 134995


# 4bd0fb1f 12-Jul-2011 John McCall <[email protected]>

Switch field destruction over to use the new destroyer-based API
and kill a lot of redundant code.

llvm-svn: 134988


# 4678f671 12-Jul-2011 Chandler Carruth <[email protected]>

Work around a problem with a static helper's formulation in release
builds introduced in r134972:

lib/CodeGen/CGExpr.cpp:1294:7: error: no matching function for call to 'EmitBitCastOfLValueToProperT

Work around a problem with a static helper's formulation in release
builds introduced in r134972:

lib/CodeGen/CGExpr.cpp:1294:7: error: no matching function for call to 'EmitBitCastOfLValueToProperType'
lib/CodeGen/CGExpr.cpp:1278:1: note: candidate function not viable: no known conversion from 'CGBuilderTy' (aka 'IRBuilder<false>') to 'llvm::IRBuilder<> &' for 1st argument

This fixes the issue by passing CodeGenFunction on down, and using its
builder directly rather than passing just the builder down.

This may not be the best / cleanest fix, Chris please review. It at
least fixes builds.

llvm-svn: 134977

show more ...


# 3f32d696 12-Jul-2011 Chris Lattner <[email protected]>

Fix a problem Eli ran into where we now reject incomplete arrays of
uncompleted struct types. We now do what llvm-gcc does and compile
them into [i8 x 0]. If the type is later completed, we make s

Fix a problem Eli ran into where we now reject incomplete arrays of
uncompleted struct types. We now do what llvm-gcc does and compile
them into [i8 x 0]. If the type is later completed, we make sure that
it is appropriately cast.

We compile the terrible example to something like this now:

%struct.A = type { i32, i32, i32 }

@g = external global [0 x i8]

define void @_Z1fv() nounwind {
entry:
call void @_Z3fooP1A(%struct.A* bitcast ([0 x i8]* @g to %struct.A*))
ret void
}

declare void @_Z3fooP1A(%struct.A*)

define %struct.A* @_Z2f2v() nounwind {
entry:
ret %struct.A* getelementptr inbounds ([0 x %struct.A]* bitcast ([0 x i8]* @g to [0 x %struct.A]*), i32 0, i64 1)
}

llvm-svn: 134972

show more ...


# d7c59353 10-Jul-2011 Chris Lattner <[email protected]>

enhance EmitLValueForFieldInitialization to do the proper pointer adjustment, allowing
us to revert the other half of r134860. Now things are back to a relatively tidy state.

llvm-svn: 134865


# a2673ce1 10-Jul-2011 Chris Lattner <[email protected]>

revert part of r134860, which is empirically unnecessary after the proper fix

llvm-svn: 134864


1...<<21222324252627282930>>...51