History log of /llvm-project-15.0.7/clang/lib/CodeGen/CGExpr.cpp (Results 1226 – 1250 of 1262)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# a7c8cf62 16-Aug-2008 Daniel Dunbar <[email protected]>

Change WarnUnsupported to ErrorUnsupported (in name and in practice).
- We are beyond the point where this shows up often and when it does
generating miscompiled files is bad.

llvm-svn: 54836


# c4baa06d 13-Aug-2008 Daniel Dunbar <[email protected]>

Add GetAddrOfConstantCString method
- Returns addr of constant for argument + '\0'.
- I couldn't think of a better name.
- Move appropriate users of GetAddrOfConstantString to this.

Rename getStr

Add GetAddrOfConstantCString method
- Returns addr of constant for argument + '\0'.
- I couldn't think of a better name.
- Move appropriate users of GetAddrOfConstantString to this.

Rename getStringForStringLiteral to GetStringForStringLiteral.

Add GetAddrOfConstantStringFromLiteral
- This combines GetAddrOfConstantString and
GetStringForStringLiteral. This method can be, but is not yet, more
efficient.

Change GetAddrOfConstantString to not add terminating '\0'
- <rdar://problem/6140956>

llvm-svn: 54768

show more ...


# 89da6ad1 13-Aug-2008 Daniel Dunbar <[email protected]>

Change ObjCRuntime GenerateProtocol[Ref] methods to take
ObjCProtocolDecl directly.

Implement CodeGen support for forward protocol decls (no-ops are so
nice to implement).

Also moved CGObjC

Change ObjCRuntime GenerateProtocol[Ref] methods to take
ObjCProtocolDecl directly.

Implement CodeGen support for forward protocol decls (no-ops are so
nice to implement).

Also moved CGObjCRuntime.h out of CodeGenModule.h

llvm-svn: 54709

show more ...


# 8d480594 11-Aug-2008 Daniel Dunbar <[email protected]>

Change CodeGenModule to only create ObjC runtime for ObjC files
- Changed CodeGenModule::getObjCRuntime to return reference.
- Added CodeGenModule::hasObjCRuntime predicate.

llvm-svn: 54645


# 56fdb6ae 11-Aug-2008 Daniel Dunbar <[email protected]>

More #include cleaning
- 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

More #include cleaning
- 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.

llvm-svn: 54632

show more ...


# 6e8aa537 11-Aug-2008 Daniel Dunbar <[email protected]>

More #include cleaning
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
- Moved Sema::getCurMethodDecl() out of line (dependent on
ObjCMethodDecl via dyn_cast).

llvm-svn: 54629


# ad319a73 11-Aug-2008 Daniel Dunbar <[email protected]>

More #include cleaning
- Remove internal uses of AST.h

llvm-svn: 54628


# 6dfdf8c9 10-Aug-2008 Daniel Dunbar <[email protected]>

Back out r54608 (inline string literals were getting an extra '\0')
temporarily, I assumed GetAddrForConstantString literal was being
used consistently but it doesn't look like it is.

Factored o

Back out r54608 (inline string literals were getting an extra '\0')
temporarily, I assumed GetAddrForConstantString literal was being
used consistently but it doesn't look like it is.

Factored out a CodeGenModule::getStringForStringLiteral which handles
extracting a std::string for the bytes of a StringLiteral, padded to
match the type.

Update EmitLValue to use getStringForStringLiteral, this was
previously not padding strings correctly. Good thing we only emit
strings in 4 different places!

llvm-svn: 54621

show more ...


# 6307f197 10-Aug-2008 Chris Lattner <[email protected]>

rename PreDefinedExpr -> PredefinedExpr

llvm-svn: 54605


# ead7c912 06-Aug-2008 Daniel Dunbar <[email protected]>

Fix bitfield accesses which straddle the boundary of the underlying
type.

- This generates somewhat less optimal code than before but this is
not hard to rectify once stable (at the cost of slig

Fix bitfield accesses which straddle the boundary of the underlying
type.

- This generates somewhat less optimal code than before but this is
not hard to rectify once stable (at the cost of slightly more
complex code).

- This currently always uses little-endian ordering of the bitfield.

- This breaks the CodeGen/bitfield.c test because it was grepping for
hard-coded assembly instructions. Will fix once a better test case
is constructed (hard to do without execution).

- This fixes SingleSource/UnitTests/2006-01-23-InitializedBitField.c
and Regression/C/PR1386.c from the test suite.

- <rdar://problem/6085090>, <rdar://problem/6094169>

llvm-svn: 54395

show more ...


# 7adf0760 04-Aug-2008 Chris Lattner <[email protected]>

Finally fix PR2189. This makes a fairly invasive but important change to
move getAsArrayType into ASTContext instead of being a method on type.
This is required because getAsArrayType(const AT), whe

Finally fix PR2189. This makes a fairly invasive but important change to
move getAsArrayType into ASTContext instead of being a method on type.
This is required because getAsArrayType(const AT), where AT is a typedef
for "int[10]" needs to return ArrayType(const int, 10).

Fixing this greatly simplifies getArrayDecayedType, which is a good sign.

llvm-svn: 54317

show more ...


# 330f0f25 31-Jul-2008 Chris Lattner <[email protected]>

Fix a regression I introduced in r54107:
http://llvm.org/viewvc/llvm-project?view=rev&revision=54107

llvm-svn: 54242


# 9c426524 29-Jul-2008 Daniel Dunbar <[email protected]>

Rework codegen emission of globals
- No (intended) functionality change.

- Primary purpose is to clearly separate (lazy) construction of
globals that are a forward declaration or tentative defi

Rework codegen emission of globals
- No (intended) functionality change.

- Primary purpose is to clearly separate (lazy) construction of
globals that are a forward declaration or tentative definition from
those that are the final definition.

- Lazy construction is now encapsulated in
GetAddrOf{Function,GlobalVar} while final definitions are
constructed in EmitGlobal{Function,Var}Definition.

- External interface for dealing with globals is now limited to
EmitGlobal and GetAddrOf{Function,GlobalVar}.

- Also updated helper functions dealing with statics, annotations,
and ctors to be private.

llvm-svn: 54179

show more ...


# 0f398c44 26-Jul-2008 Chris Lattner <[email protected]>

remove uses of QualType::getCanonicalType() from codegen for PR2189

llvm-svn: 54107


# 574dee6c 26-Jul-2008 Chris Lattner <[email protected]>

change more instances of QualType::getCanonicalType to call
ASTContext::getCanonicalType instead (PR2189)

llvm-svn: 54105


# 5696e7ba 17-Jun-2008 Chris Lattner <[email protected]>

Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.
Patch by David Chisnall!

llvm-svn: 52422


# 08e17118 17-Jun-2008 Ted Kremenek <[email protected]>

This patch is motivated by numerous strict-aliasing warnings when compiling
clang as a Release build.

The big change is that all AST nodes (subclasses of Stmt) whose children are
Expr* store their c

This patch is motivated by numerous strict-aliasing warnings when compiling
clang as a Release build.

The big change is that all AST nodes (subclasses of Stmt) whose children are
Expr* store their children as Stmt* or arrays of Stmt*. This is to remove
strict-aliasing warnings when using StmtIterator. None of the interfaces of any
of the classes have changed (except those with arg_iterators, see below), as the
accessor methods introduce the needed casts (via cast<>). While this extra
casting may seem cumbersome, it actually adds some important sanity checks
throughout the codebase, as clients using StmtIterator can potentially overwrite
children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts
provide extra sanity checks that are operational in debug builds to catch
invariant violations such as these.

For classes that have arg_iterators (e.g., CallExpr), the definition of
arg_iterator has been replaced. Instead of it being Expr**, it is an actual
class (called ExprIterator) that wraps a Stmt**, and provides the necessary
operators for iteration. The nice thing about this class is that it also uses
cast<> to type-checking, which introduces extra sanity checks throughout the
codebase that are useful for debugging.

A few of the CodeGen functions that use arg_iterator (especially from
OverloadExpr) have been modified to take begin and end iterators instead of a
base Expr** and the number of arguments. This matches more with the abstraction
of iteration. This still needs to be cleaned up a little bit, as clients expect
that ExprIterator is a RandomAccessIterator (which we may or may not wish to
allow for efficiency of representation).

This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c,
which was already broken) on both a Debug and Release build, but it should
obviously be reviewed.

llvm-svn: 52378

show more ...


# 327944b3 13-Jun-2008 Eli Friedman <[email protected]>

Basic support for volatile loads and stores. Stores the volatile
qualifier in the lvalue, and changes lvalue loads/stores to honor
the volatile flag. Places which need some further attention are m

Basic support for volatile loads and stores. Stores the volatile
qualifier in the lvalue, and changes lvalue loads/stores to honor
the volatile flag. Places which need some further attention are marked
with FIXMEs.

Patch by Cédric Venet.

llvm-svn: 52264

show more ...


Revision tags: llvmorg-2.3.0
# f6b091f7 01-Jun-2008 Eli Friedman <[email protected]>

First cut at setting attributes for functions and calls; this puts us
much closer to passing the gcc struct layout tests.

It might be possible to refactor this a bit, but I'm not sure there's
actu

First cut at setting attributes for functions and calls; this puts us
much closer to passing the gcc struct layout tests.

It might be possible to refactor this a bit, but I'm not sure there's
actually enough common code for that to be useful.

To get the calling convention completely correct, a bit of
platform-specific code is necessary even for x86-Linux. On x86-Linux, the
alignment of function parameters is extremely strange; as far as I can tell,
it's always 4 except for SSE vectors or structs containing SSE vectors. I'm
continuing to investigate this.

llvm-svn: 51839

show more ...


# 149a57f7 01-Jun-2008 Eli Friedman <[email protected]>

Minor cleanup to use the ConvertTypeForMem helper.

llvm-svn: 51837


# 133e8040 29-May-2008 Eli Friedman <[email protected]>

Rearrange EmitLValueForField a bit to work properly for _Bool bitfields
in unions (we don't want to do the union-specific bitcast for
bit-fields).

llvm-svn: 51678


# 5d30975e 22-May-2008 Dan Gohman <[email protected]>

Change uses of llvm::Type::isFirstClassType to use the new
llvm::Type::isSingleValueType. Currently these two functions have
the same behavior, but soon isFirstClassType will return true for
struct a

Change uses of llvm::Type::isFirstClassType to use the new
llvm::Type::isSingleValueType. Currently these two functions have
the same behavior, but soon isFirstClassType will return true for
struct and array types.

Clang may some day want to use of isFirstClassType for some of
these some day as an optimization, but it'll require some
consideration.

llvm-svn: 51446

show more ...


# 75d69da5 22-May-2008 Dan Gohman <[email protected]>

Move getAccessedFieldNo out of lib/AST/Expr.cpp into
lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to
use its own enum for visibility types instead of using
llvm::GlobalValue::Visibil

Move getAccessedFieldNo out of lib/AST/Expr.cpp into
lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to
use its own enum for visibility types instead of using
llvm::GlobalValue::VisibilityTypes. These changes eliminate
dependencies in the AST library on LLVM's VMCore library.

llvm-svn: 51398

show more ...


# 9a5ffcb1 21-May-2008 Eli Friedman <[email protected]>

Remove an unnecessary/buggy if check. Ran into this with some other
changes in my tree, so I don't have a testcase which affects trunk.

llvm-svn: 51371


# f23b6fa4 19-May-2008 Eli Friedman <[email protected]>

Fix the emission of expressions like char a[10] = "asdf"; previously,
they were causing bad code to be emitted. There are two fixes here: one
makes sure we emit a string that is long enough, and o

Fix the emission of expressions like char a[10] = "asdf"; previously,
they were causing bad code to be emitted. There are two fixes here: one
makes sure we emit a string that is long enough, and one makes sure we
properly handle string initialization in init lists.

llvm-svn: 51259

show more ...


1...<<4142434445464748495051