History log of /external/clang/lib/CodeGen/CGExprScalar.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4967a710c84587c654b56c828382219c3937dacb 20-Sep-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master Clang for rebase to r275480

Bug: http://b/31320715

This merges commit ac9cc4764cf47a6c3f031687d8592e080c9f5001 from
aosp/dev.

Test: Build AOSP and run RenderScript tests (host tests for slang and
libbcc, RsTest, CTS)

Change-Id: Ic2875e5c3673c83448cd7d1013861e42947b1b55
/external/clang/lib/CodeGen/CGExprScalar.cpp
87d948ecccffea9e9e37d0d053b246e2d6d6c47b 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r256229

http://b/26987366

Change-Id: I5d349c9843ea5c24d6e455956f8a446393b6873d
/external/clang/lib/CodeGen/CGExprScalar.cpp
b6d6993e6e6d3daf4d9876794254d20a134e37c2 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r239765

Change-Id: I0393bcc952590a7226af8c4b58534a8ee5fd2d99
/external/clang/lib/CodeGen/CGExprScalar.cpp
58878f85ab89b13e9eea4af3ccf055e42c557bc8 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r235153

Change-Id: Ia94bbcb6da7c75b6e7c2afedd1001094d62a7324
/external/clang/lib/CodeGen/CGExprScalar.cpp
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r233350

Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/lib/CodeGen/CGExprScalar.cpp
0e2c34f92f00628d48968dfea096d36381f494cb 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master clang for rebase to r230699.

Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/CodeGen/CGExprScalar.cpp
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/CodeGen/CGExprScalar.cpp
c568f1e98938584c0ef0b12ae5018ff7d90a4072 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/CodeGen/CGExprScalar.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/CodeGen/CGExprScalar.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/CodeGen/CGExprScalar.cpp
c56991755e6799f1f733d02f7a98d3159e94c185 09-Nov-2013 Nick Lewycky <nicholas@mxc.ca> Remove an incorrect optimization inside Clang's IRGen. Its check to determine
whether we can safely lower a conditional operator to select was insufficient.
I've left a large comment in place to explaining the sort of problems that this
transform can encounter in clang in the hopes of discouraging others from
reimplementing it wrongly again in the future. (The test should also help with
that, but it's easy to work around any single test I might add and think that
your particular implementation doesn't miscompile any code.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
69170e6e41e72c84fe5303540c1aa7ca9944ff18 23-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Split -fsanitize=bounds to -fsanitize=array-bounds (for the frontend-inserted
check using the ubsan runtime) and -fsanitize=local-bounds (for the middle-end
check which inserts traps).

Remove -fsanitize=local-bounds from -fsanitize=undefined. It does not produce
useful diagnostics and has false positives (PR17635), and is not a good
compromise position between UBSan's checks and ASan's checks.

Map -fbounds-checking to -fsanitize=local-bounds to restore Clang's historical
behavior for that flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4ee7dc2369c1f0257a73b2e83a7d38fdebdd9176 02-Oct-2013 Nick Lewycky <nicholas@mxc.ca> Thread a SourceLocation into the EmitCheck for "load_invalid_value". This occurs
when scalars are loaded / undergo lvalue-to-rvalue conversion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
414a1bdbdaf250e0488589f12865c8961831b65d 18-Sep-2013 Hal Finkel <hfinkel@anl.gov> Add the intrinsic __builtin_convertvector

LLVM supports applying conversion instructions to vectors of the same number of
elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to
cause such instructions to be generated when using builtin vector types.

C-style casting on vectors is already defined in terms of bitcasts, and so
cannot be used for these conversions as well (without leading to a very
confusing set of semantics). As a result, this adds a __builtin_convertvector
intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is
intended to aid the creation of vector intrinsic headers that create generic IR
instead of target-dependent intrinsics (in other words, this is a generic
_mm_cvtepi32_ps). As noted in the documentation, the action of
__builtin_convertvector is defined in terms of the action of a C-style cast on
each vector element.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8593e7821c02bd429964d2daf7a6acccb8040fb2 08-Aug-2013 Filipe Cabecinhas <me@filcab.net> UBSan: Fix alignment checks emitted in downcasts.

Summary:
UBSan was checking for alignment of the derived class on the pointer to
the base class, before converting. With some class hierarchies, this could
generate false positives.

Added test-case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6f4f8083931a92f9959168d4430da7ddf9183100 03-Aug-2013 Craig Topper <craig.topper@gmail.com> Add support for passing -1 to __builtin_shufflevector to signify an undefined element value to match IR capabilities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e1791d80d5c8e26cd7727524b2bf028e00998558 01-Aug-2013 Craig Topper <craig.topper@gmail.com> Remove more odd code that tries to account for an off by 1 problem in vec3 shuffles that doesn't really exist.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2f66512a110844268c0f230ceea2c2ec1006858f 01-Aug-2013 Craig Topper <craig.topper@gmail.com> Fix to handle all non-power-of-2 vector sizes in the mask form of _builtin_shuffle_vector.

Previously a 2-bit mask was used to mask each element of a vec6 mask before doing the extracts instead of 3-bit mask necessary to cover 0-5. vec3 was the only non-power-of-2 that worked correctly because a +1 conditionally added before calculating floor(log2(elements)).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
72c422cc2b27c87b4a217ab01a9d8bfd836a30be 01-Aug-2013 Craig Topper <craig.topper@gmail.com> Remove broken and unnecessary vec3 handling from VisitShuffleVectorExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
34d55e1a315e6a4c132f463640af4ae6f8aed8e3 27-Jul-2013 Craig Topper <craig.topper@gmail.com> Fix formatting. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d10e5c2e5c1f74620c0a0e312389855ce82df1a5 26-Jul-2013 Craig Topper <craig.topper@gmail.com> Remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a5e660188a3c654cf0c88ed1093b28207e870b2b 20-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Make IgnoreParens() look through ChooseExprs.

This is the same way GenericSelectionExpr works, and it's generally a
more consistent approach.

A large part of this patch is devoted to caching the value of the condition
of a ChooseExpr; it's needed to avoid threading an ASTContext into
IgnoreParens().

Fixes <rdar://problem/14438917>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
21cde050b64eefbb5094af67985752eee42d00e2 17-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Make Expr::isConstantInitializer match IRGen.

Sema needs to be able to accurately determine what will be
emitted as a constant initializer and what will not, so
we get accurate errors in C and accurate -Wglobal-constructors
warnings in C++. This makes Expr::isConstantInitializer match
CGExprConstant as closely as possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
658cd2c287b1a0b419f51cd18e5a48d4560d1c56 13-Jul-2013 David Blaikie <dblaikie@gmail.com> PR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to emit the full definition of a type in -flimit-debug-info

This simplifies the core benefit of -flimit-debug-info by taking a more
systematic approach to avoid emitting debug info definitions for types
that only require declarations. The previous ad-hoc approach (3 cases
removed in this patch) had many holes.

The general approach (adding a bit to TagDecl and callback through
ASTConsumer) has been discussed with Richard Smith - though always open
to revision.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0934e18b620ecaa6c7ec18ba5c4286b6122d6fb8 12-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Add support for complex compound assignments where the LHS is a scalar.

Fixes <rdar://problem/11224126> and PR12790.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2ac2fa7726eb2f6fe445e098489e92931c31f7ca 11-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Make sure we don't emit invalid IR for StmtExprs with complex cleanups.

Fixes <rdar://problem/14074868>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c3bf52ced9652f555aa0767bb822ec4c64546212 21-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++1y: Allow aggregates to have default initializers.

Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in
CXXCtorInitializers and in InitListExprs to represent a default initializer.

There's an additional complication here: because the default initializer can
refer to the initialized object via its 'this' pointer, we need to make sure
that 'this' points to the right thing within the evaluation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
64aa4b3ec7e62288e2e66c1935487ece995ca94b 17-Apr-2013 John McCall <rjmccall@apple.com> Standardize accesses to the TargetInfo in IR-gen.

Patch by Stephen Lin!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
508764518dd54eb7be82b0474cb42ef8dbe9ebd3 28-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> UBSan: Don't diagnose inf/nan conversions between floating-point types. It's far from clear whether these have undefined behavior, and these checks are helping no-one. Keep the double->float overflow warnings, though, since those are useful in practice, even though it's unclear whether such operations have defined behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
aa624954c50a741528752b85d3a3bf11ef9771db 19-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR15383: When -fsanitize=float-cast-overflow checks a float-to-int conversion,
it wasn't taking into account that the float should be truncated *before* the
range check happens. Thus (unsigned)-0.99 and (unsigned char)255.9 have defined
behavior and should not be trapped.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9d232c884ea9872d6555df0fd7359699819bc1f1 07-Mar-2013 John McCall <rjmccall@apple.com> Change hasAggregateLLVMType, which conflates complex and
aggregate types in a profoundly wrong way that has to be
worked around in every call site, to getEvaluationKind,
which classifies and distinguishes between all of these
cases.

Also, normalize the API for loading and storing complexes.

I'm working on a larger patch and wanted to pull these
changes out, but it would have be annoying to detangle
them from each other.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
72c1dba494b02960284bc6618c1b640c950c3785 03-Mar-2013 David Chisnall <csdavec@swan.ac.uk> Improve C11 atomics support:

- Generate atomicrmw operations in most of the cases when it's sensible to do
so.
- Don't crash in several common cases (and hopefully don't crash in more of
them).
- Add some better tests.

We now generate significantly better code for things like:
_Atomic(int) x;
...
x++;

On MIPS, this now generates a 4-instruction ll/sc loop, where previously it
generated about 30 instructions in two nested loops. On x86-64, we generate a
single lock incl, instead of a lock cmpxchgl loop (one instruction instead of
ten).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bd7370a78604e9a20d698bfe328c1e43f12a0613 28-Feb-2013 John McCall <rjmccall@apple.com> Use the actual ABI-determined C calling convention for runtime
calls and declarations.

LLVM has a default CC determined by the target triple. This is
not always the actual default CC for the ABI we've been asked to
target, and so we sometimes find ourselves annotating all user
functions with an explicit calling convention. Since these
calling conventions usually agree for the simple set of argument
types passed to most runtime functions, using the LLVM-default CC
in principle has no effect. However, the LLVM optimizer goes
into histrionics if it sees this kind of formal CC mismatch,
since it has no concept of CC compatibility. Therefore, if this
module happens to define the "runtime" function, or got LTO'ed
with such a definition, we can miscompile; so it's quite
important to get this right.

Defining runtime functions locally is quite common in embedded
applications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bb60fc6a71f280f8e19e7f1a784ef05c40f5aa39 25-Feb-2013 Will Dietz <wdietz2@illinois.edu> [ubsan] Emit single check for left shift.

Avoids warning twice on same shift.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a0a628f839cf50844cc0f226bd9cb72485f98f91 23-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> ubsan: Emit bounds checks for array indexing, vector indexing, and (in really simple cases) pointer arithmetic. This augments the existing bounds checking with language-level array bounds information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
52e933b0c3a1d552ab0e4d629ee15cff99a94447 21-Feb-2013 Joey Gouly <joey.gouly@arm.com> Add support to Sema and CodeGen for floating point vector types in OpenCL.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c764830bdb6de82baed068889096bd3e52d4cbda 13-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> ubsan: Add checking for invalid downcasts. Per [expr.static.cast]p2 and p11,
base-to-derived casts have undefined behavior if the object is not actually an
instance of the derived type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
78d85b1c5830a881c0a20a1b3fea99ee73149590 30-Jan-2013 Chad Rosier <mcrosier@apple.com> [ubsan] Implement the -fcatch-undefined-behavior flag using a trapping
implementation; this is much more inline with the original implementation
(i.e., pre-ubsan) and does not require run-time library support.

The trapping implementation can be invoked using either '-fcatch-undefined-behavior'
or '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error', with the latter
being preferred. Eventually, the -fcatch-undefined-behavior' flag will be removed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
19dbb20ac4371fae3190379a7e7bd467af3c00aa 23-Jan-2013 Joey Gouly <joey.gouly@arm.com> Add a new LangOpt NativeHalfType. This option allows for native half/fp16
operations (as opposed to storage only half/fp16).

Also add some semantic checks for OpenCL half types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e6b9d802fb7b16d93474c4f1c179ab36202e8a8b 20-Jan-2013 Guy Benyei <guy.benyei@intel.com> Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4f45bc099f2665bc6e4bcbb169aa452390dbf3fe 18-Jan-2013 Will Dietz <wdietz2@illinois.edu> [ubsan] Add support for -fsanitize-blacklist

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f20318f9e27a064bdd9a3fbb51d2c3a4a4f3ac2e 10-Jan-2013 David Tweed <david.tweed@arm.com> Testing with a full OpenCL compiler (based on clang) reveals r71734 missed
difference between type widths of a vector and the width of one of its elements
in the case of vector shifts. Use correct witdth in the vector case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
822023a5531cfa66bc2735d434032c9bf403a490 07-Jan-2013 Will Dietz <wdietz2@illinois.edu> [ubsan] Use correct type for compound assignment ops.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7a83421776416d6a9044fb03b5b02208b47646c1 07-Jan-2013 David Tweed <david.tweed@arm.com> Scalar shifts in the OpenCL specification (as of v. 1.2) are defined to be
with respect to the lower "left-hand-side bitwidth" bits, even when negative);
see OpenCL spec 6.3j. This patch both implements this behaviour in the code
generator and "constant folding" bits of Sema, and also prevents tests
to detect undefinedness in terms of the weaker C99 or C++ specifications
from being applied.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3b844ba7d5be205a9b4f5f0b0d1b7978977f4b8c 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate to
reflect the migration in r171366.

Re-sort the #include lines to reflect the new paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0b2270892387bfeaf61aeca0ddfe5fc97b7fa652 01-Jan-2013 Benjamin Kramer <benny.kra@googlemail.com> Simplify vector splat code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0dbe2fb7758fe64568206b5bc0f1c5b106b9c806 21-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Reinstate r170806, reverted in r170835, with a fix use i1 instead of i8 for a value-initialized bool!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
98ab776a8a9e19c7bf1bd04d610ec2b2c37aef7a 21-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> Revert r170806, "Fix some bugs where we would sometimes use 0, not -1, when emitting a null constant of type pointer-to-data-member."

It broke stage2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d8af340e27a1ecabec925a1090a3e4984688b5b1 21-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix some bugs where we would sometimes use 0, not -1, when emitting a null constant of type pointer-to-data-member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ad95481b2769ad61f23afc5e2c31f11c66090657 02-Dec-2012 Will Dietz <wdietz2@illinois.edu> [ubsan] Add flag to enable recovery from checks when possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
b85403658a77e9c19c391c8f02bc7767544a25d9 27-Nov-2012 Will Dietz <wdietz2@illinois.edu> Add -fsanitize=integer for reporting suspicious integer behaviors.

Introduces new sanitizer "unsigned-integer-overflow".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
931c0833811c030884fa50b2ccbd3c34f0f4c4ee 15-Nov-2012 Lang Hames <lhames@gmail.com> Make -ffp-contract a codegen option, rather than a laguage option. This makes
more sense anyway - it determines how expressions are codegen'd. It also ensures
that -ffp-contract=fast has the intended effect when compiling LLVM IR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c54e25f9450d927dcd41270639523c1b4c0d5868 06-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Classify the INT_MIN/-1 check as -fsanitize=signed-integer-overflow, not as -fsanitize=divide-by-zero.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d6396a681c9acbe56bc41bbc2bed2db45755bcd7 05-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Use the individual -fsanitize=<...> arguments to control which of the UBSan
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7edf9e38b91917b661277601c0e448eef0eb2b56 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Simplify: replace getContext().getLangOpts() with just getLangOpts().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
da082f12c2633e9b45046fdce81e8b5847b9a26b 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Clean up misapplication of diff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
cc305617e952f8c3a06b63d9225d0dd7769341b7 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Split emission of -ftrapv checks and -fcatch-undefined-behavior checks into
separate functions, since they share essentially no code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bb12243a487e70c0e65bcebdaa12ad754f92e022 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove divison-by-zero checks from -ftrapv. These checks were incompatible with
g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still
available under -fcatch-undefined-behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4cdad3151bfb2075c6bdbfe89fbb08f31a90a45b 23-Oct-2012 Douglas Gregor <dgregor@apple.com> Switch CodeGenOptions over to a .def file, like we do with LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
b2aa66c0f5ad4e2c67b7d02af6a644432ca189cf 13-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: Trap undefined behavior due to conversions to or
from a floating-point type where the source value is not in the range of
representable values of the destination type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4def70d3040e73707c738f7c366737a986135edf 09-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
25a6a84cf5067b32c271e3ba078676dee838798d 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ff4ae6d4031962a7c4fdd344f40a91f0fcd26a64 04-Oct-2012 Lang Hames <lhames@gmail.com> Fail early with a clear assert if an operation with multiple uses somehow ends
up being contracted during codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ddc57332cdc86ed2db28a3b3761b774944937191 03-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Always initialize FPContractable.

false is used as a baseline here, we may want to allow contraction in some of
the cases. Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
041ce8e00afd1185549a25d5c2b97d219ae032d9 03-Oct-2012 Jordan Rose <jordan_rose@apple.com> Teach getCXXRecordDeclForPointerType about references.

Then, rename it getPointeeCXXRecordDecl and give it a nice doc comment,
and actually use it.

No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
be9af1288881110e406b87914162eaa59f1e5918 02-Oct-2012 Lang Hames <lhames@gmail.com> Add FP_CONTRACT support for clang.

Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7ac9ef1c82c779a5348ed11b3d10e01c58803b35 08-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: Factor emission of the creation of, and branch to,
the trap BB out of the individual checks and into a common function, to prepare
for making this code call into a runtime library. Rename the existing EmitCheck
to EmitTypeCheck to clarify it and to move it out of the way of the new
EmitCheck.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a6c66cedc022c9e5d45a937d6b8cff491a6bf81b 31-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Change the representation of builtin functions in the AST
(__builtin_* etc.) so that it isn't possible to take their address.
Specifically, introduce a new type to represent a reference to a builtin
function, and a new cast kind to convert it to a function pointer in the
operand of a call. Fixes PR13195.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
36d5ceaab220422c24464c11b946488f0b075cd5 28-Aug-2012 Michael Liao <michael.liao@intel.com> Fix PR13704

- The increment needs to be signed value to preserve the original value when
its data type is larger than 64-bit integer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5b092ef9df6967bac9cf856e8c93dd959ebdb689 25-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove spurious string literal for bool argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9d3e226acad5e23e562cde0a69362bb266f2a333 25-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: add the -ftrapv checks to the set of things caught
by this mode, and also check for signed left shift overflow. The rules for the
latter are a little subtle:

* neither C89 nor C++98 specify the behavior of a signed left shift at all
* in C99 and C11, shifting a 1 bit into the sign bit has undefined behavior
* in C++11, with core issue 1457, shifting a 1 bit *out* of the sign bit has
undefined behavior

As of this change, we use the C99 rules for all C language variants, and the
C++11 rules for all C++ language variants. Once we have individual
-fcatch-undefined-behavior= flags, this should be revisited.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2c9f87ca5cccbfdaad82762368af5b2323320653 24-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> New -fcatch-undefined-behavior features:
* when checking that a pointer or reference refers to appropriate storage for a type, also check the alignment and perform a null check
* check that references are bound to appropriate storage
* check that 'this' has appropriate storage in member accesses and member function calls


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d4f5198ae07d9a4958d8191bac694ded12173ad9 04-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used instead.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
860a319e62b0e256817a458396d191aa91c0787a 16-Jun-2012 Eli Friedman <eli.friedman@gmail.com> Fix Sema and IRGen for atomic compound assignment so it has the right semantics when promotions are involved.
(As far as I can tell, this only affects some edge cases.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e14da79c7b1c336b72e6a4548f53b1a9534f7e0d 07-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> reverse r158117.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
30775778897112f79b6641e98c2722d306053f0b 07-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> When doing arithmatic on vla pointer, make sure
to emit vla size to prevent an irgen crash.
// rdar://11485774


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
581deb3da481053c4993c7600f97acf7768caac5 06-Jun-2012 David Blaikie <dblaikie@gmail.com> Revert Decl's iterators back to pointer value_type rather than reference value_type

In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.

This rolls back r155808 and r155869.

Review by Doug Gregor incorporating feedback from Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
565204db54a61beacef4eb7a55cfead81ad58834 29-May-2012 Peter Collingbourne <peter@pcc.me.uk> OpenCL: Fix vector conditional operator CodeGen for the case where
the operands are vectors of doubles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
262bc18e32500558af7cb0afa205b34bd37bafed 30-Apr-2012 David Blaikie <dblaikie@gmail.com> Remove the ref/value inconsistency in filter_decl_iterator.

filter_decl_iterator had a weird mismatch where both op* and op-> returned T*
making it difficult to generalize this filtering behavior into a reusable
library of any kind.

This change errs on the side of value, making op-> return T* and op* return
T&.

(reviewed by Richard Smith)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3a70cd6e1cc414856e41ce5509aa61c89bf472dc 27-Apr-2012 Alexey Samsonov <samsonov@google.com> Use enum to set debug info size generated by Clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
eb382ec1507cf2c8c12d7443d0b67c076223aec6 19-Apr-2012 Patrick Beard <pcbeard@mac.com> Implements boxed expressions for Objective-C. <rdar://problem/10194391>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8250016fb9491fcfde7fce05230d66e267944484 10-Apr-2012 Duncan Sands <baldrick@free.fr> Express the number of ULPs in fpaccuracy metadata as a real rather than a
rational number, eg as 2.5 rather than 5, 2. OK'd by Peter Collingbourne.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
87b9c0311f96c35109204a49d4bda909aa72b62a 05-Apr-2012 Eli Friedman <eli.friedman@gmail.com> Make the variant of __builtin_shufflevector that takes the shuffle indexes as a vector actually usable. Patch by David Neto. PR12465.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f4b88a45902af1802a1cb42ba48b1c474474f228 10-Mar-2012 John McCall <rjmccall@apple.com> Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to
track whether the referenced declaration comes from an enclosing
local context. I'm amenable to suggestions about the exact meaning
of this bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
dd2ecee313b558a9b621ec003b45e0fbc83508d7 10-Mar-2012 John McCall <rjmccall@apple.com> Unify the BlockDeclRefExpr and DeclRefExpr paths so that
we correctly emit loads of BlockDeclRefExprs even when they
don't qualify as ODR-uses. I think I'm adequately convinced
that BlockDeclRefExpr can die.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3d13c5a1e72ed8f8be9c083791d30643d1b1ec43 09-Mar-2012 Daniel Dunbar <daniel@zuster.org> [AST] Reduce Decl::getASTContext() calls.
- This function is not at all free; pass it around along some hot paths instead
of recomputing it deep inside various VarDecl methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
946e2726f91c17574d248f9c4b3eeea41e892a22 07-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Don't even try to directly emit the value of a DeclRefExpr if that declaration
is not usable in a constant expression. ~2.5% speedup on 403.gcc / combine.c.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ebcb57a8d298862c65043e88b2429591ab3c58d3 06-Mar-2012 Ted Kremenek <kremenek@apple.com> Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.

My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.

Docs are forthcoming to document the implementation and behavior of these features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a3ca41f0c2bd1c4a752df88b283332f3b757d21e 03-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Reinstate r151879, r151880, reverted in r151922, along with a bugfix for
scalar emission of DeclRefExprs to const bools: emit scalar bools as i1,
not as i8.

In addition to the extra unit testing, this has successfully bootstrapped.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c169e08f3ad678df4ffb87cbbe5096208f6bf40a 02-Mar-2012 Daniel Dunbar <daniel@zuster.org> Revert r151879, r151880, "PR12145: Avoid emitting loads of constexpr variables in contexts where there" and "Fix buildbot: make this test less dependent on the value names in the produced IR."

They broke bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a3cac5b76a5243d8fca812d3a276950b0cfc56b6 02-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR12145: Avoid emitting loads of constexpr variables in contexts where there
is no odr-use of the variable. Go slightly beyond what the standard requires
for variables of reference type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
cae40c4d448529fe65de3d87bdbe97d3b54b4d98 28-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Implement IRGen for the retain-autorelease in the lambda conversion-to-block-pointer outside of ARC. Testcases coming up soon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ac1303eca6cbe3e623fb5ec6fe7ec184ef4b0dfa 22-Feb-2012 Douglas Gregor <dgregor@apple.com> Generate an AST for the conversion from a lambda closure type to a
block pointer that returns a block literal which captures (by copy)
the lambda closure itself. Some aspects of the block literal are left
unspecified, namely the capture variable (which doesn't actually
exist) and the body (which will be filled in by IRgen because it can't
be written as an AST).

Because we're switching to this model, this patch also eliminates
tracking the copy-initialization expression for the block capture of
the conversion function, since that information is now embedded in the
synthesized block literal. -1 side tables FTW.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
dfb80ded6767f7b79a0f1fa4f6921d543ff0a643 18-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix wrong-code bug: __imag on a scalar lvalue should produce a zero rvalue,
rather than an lvalue referring to the scalar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4d4e5c1ae83f4510caa486b3ad19de13048f9f04 15-Feb-2012 John McCall <rjmccall@apple.com> Split reinterpret_casts of member pointers out from CK_BitCast; this
is general goodness because representations of member pointers are
not always equivalent across member pointer types on all ABIs
(even though this isn't really standard-endorsed).

Take advantage of the new information to teach IR-generation how
to do these reinterprets in constant initializers. Make sure this
works when intermingled with hierarchy conversions (although
this is not part of our motivating use case). Doing this in the
constant-evaluator would probably have been better, but that would
require a *lot* of extra structure in the representation of
constant member pointers: you'd really have to track an arbitrary
chain of hierarchy conversions and reinterpretations in order to
get this right. Ultimately, this seems less complex. I also
wasn't quite sure how to extend the constant evaluator to handle
foldings that we don't actually want to treat as extended
constant expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
14c598268ff7534d3753ae84eba9b8a81bf0bf8f 14-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Use a simpler (and more efficient) pattern to pad vectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8b418685e9e4f02f4eb2a76e1ec063e07552b68d 07-Feb-2012 Chris Lattner <sabre@nondot.org> simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5fa560819d41857d80a224f80ebc1964e54c16eb 06-Feb-2012 Craig Topper <craig.topper@gmail.com> Fix vector splat casts to cast element to the appropriate vector element before inserting into the vector. Fixes PR11930.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2ce8842641cc312628c4be836d34eb250e7c3f78 25-Jan-2012 Chris Lattner <sabre@nondot.org> reapply r148902:

"use the new ConstantVector::getSplat method where it makes sense."

Also simplify a bunch of code to use the Builder->getInt32 instead
of doing it the hard and ugly way. Much more progress could be made
here, but I don't plan to do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
af521dae8ee15ebf4ecceae3d25f66a475104a07 25-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert 148902 which was part of 148901 which was reverted in r148906.

Original log:
use the new ConstantVector::getSplat method where it makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9ddc6246b5f3dbb1a1e05d012361dc2c6d403381 25-Jan-2012 Chris Lattner <sabre@nondot.org> use the new ConstantVector::getSplat method where it makes sense.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3026348bd4c13a0f83b59839f64065e0fcbea253 20-Jan-2012 David Blaikie <dblaikie@gmail.com> More dead code removal (using -Wunreachable-code)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4f692c27d74e249d6ef8d24792c35f3e5c620e2a 16-Jan-2012 Tanya Lattner <tonic@nondot.org> Add support for OpenCL 1.1 logical operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7a7ee3033e44b45630981355460ef89efa0bdcc4 16-Jan-2012 David Chisnall <csdavec@swan.ac.uk> Some improvements to the handling of C11 atomic types:

- Add atomic-to/from-nonatomic cast types
- Emit atomic operations for arithmetic on atomic types
- Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load
- Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function.
- Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it.

Still to do:

- Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg.
- Add a signal fence builtin
- Properly set the fenv state in atomic operations on floating point values
- Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context)
- Fix the many remaining corner cases



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d97927d69b277120f8d403580c44acd84907d7b4 06-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Revert r147664; it's breaking clang regression tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2d5f0952a93dae4b648f2b33bab621ad6e932d9a 06-Jan-2012 Jakub Staszak <kubastaszak@gmail.com> Silence GCC warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
80d4b55db94db2172a04617d1a80feca6bbcea5c 28-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Small refactoring and simplification of constant evaluation and some of its
clients. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d71f44266a598ab174f17435289526bbb57000e2 20-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Switch a few callers of MakeAddrLValue places over to MakeNaturalAlignAddrLValue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1e4f68ce0bffd9a6b9a8fc56d1766177382788e3 08-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Fix an edge case in IRGen for conditionals. PR11509.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1a343ebbf413e8eae6b2737b2b2d79cbf5765571 10-Nov-2011 John McCall <rjmccall@apple.com> Enter the cleanups for a block outside the enclosing
full-expression. Naturally they're inactive before we enter
the block literal expression. This restores the intended
behavior that blocks belong to their enclosing scope.

There's a useful -O0 / compile-time optimization that we're
missing here with activating cleanups following straight-line
code from their inactive beginnings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7864435ef2bce200224120bd1df3aed98ea5b99a 07-Nov-2011 John McCall <rjmccall@apple.com> Rip out CK_GetObjCProperty.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
db45806b991013280a03057025c9538de64d5dfb 07-Nov-2011 John McCall <rjmccall@apple.com> Rip the ObjCPropertyRef l-value kind out of IR-generation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4b9c2d235fb9449e249d74f48ecfec601650de93 06-Nov-2011 John McCall <rjmccall@apple.com> Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.

Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.

I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
51f4708c00110940ca3f337961915f2ca1668375 29-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c5096cbf7a42e0f9012945b00d9037a5b5a88d72 27-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Annotate imprecise FP division with fpaccuracy metadata

The OpenCL single precision division operation is only required to
be accurate to 2.5ulp. Annotate the fdiv instruction with metadata
which signals to the backend that an imprecise divide instruction
may be used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3c3b7f90a863af43fa63043d396553ecf205351c 25-Oct-2011 John McCall <rjmccall@apple.com> Restore r142914 and r142915, now with missing file and apparent
GCC compiler workaround.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
327a50f46449c946c42d50d97689bcb30e2af7d9 25-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> Revert r142914 and r142915, due to possibly missing file.

r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a1b852f8e1bee5ed3604ee483803cef39ce57a20 25-Oct-2011 John McCall <rjmccall@apple.com> Introduce a placeholder type for "pseudo object"
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.

Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c8645e38bfe5ab46e424b7aaca53c064105c4265 15-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Handle an edge case involving the conditional operator and throw expressions. PR10582.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
aa4a99b4a62615db243f7a5c433169f2fc704420 15-Oct-2011 Anton Korobeynikov <asl@math.spbu.ru> Provide half floating point support as a storage only type.
Lack of half FP was a regression compared to llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
276b061970939293f1abaf694bd3ef05b2cbda79 11-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Initial implementation of __atomic_* (everything except __atomic_is_lock_free).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
348f16fc7c71f0d9b651cb79fd1012843073493f 04-Oct-2011 John McCall <rjmccall@apple.com> Mark calls to objc_retainBlock that don't result from casts
to id so that we can still optimize them appropriately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
578faa837b552403e2002b97fdfbfde14f2448e5 27-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com> de-tmpify clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
cea8d966f826554f0679595e9371e314e8dbc1cf 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Treat list-initialization of scalars as a first-class citizen in C++11.
Allow empty initializer lists for scalars, which mean value-initialization.
Constant evaluation for single-element and empty initializer lists for scalars.
Codegen for empty initializer lists for scalars.
Test case comes in next commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Removing a bunch of dead returns/breaks after llvm_unreachables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Switch assert(0/false) llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
33e56f3273457bfa22c7c50bc46cf5a18216863d 10-Sep-2011 John McCall <rjmccall@apple.com> Rename the ARC cast kinds to start with "ARC".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
dc05b11c67331016473fbc7909827b1b89c9616b 10-Sep-2011 John McCall <rjmccall@apple.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1d9b3b25f7ac0d0195bba6b507a684fe5e7943ee 09-Sep-2011 John McCall <rjmccall@apple.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ec24b0ed9ccf8b34986eadeb98dd0b4a0a50f6f2 14-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Fix r137086 to actually work properly in general. PR10650.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3f86ce1dc64a46d9cd3675787b8af32c9158abe6 09-Aug-2011 Douglas Gregor <dgregor@apple.com> Hand materialization of temporary expressions when emitting a scalar
expression. Fxies PR10592.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
cb8095f766f1fe3d664d90ec450093468933f23c 20-Jul-2011 Chris Lattner <sabre@nondot.org> 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!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
410b12e55395216a02a848a791a38b0f153eba87 20-Jul-2011 Chris Lattner <sabre@nondot.org> fix PR10395 - array decay can produce an interesting type when
decaying an array of incomplete type (which has type [0 x i8]*) to a
normal pointer (which has incompletetype*).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2acc6e3feda5e4f7d9009bdcf8b1cd777fecfe2d 18-Jul-2011 Chris Lattner <sabre@nondot.org> de-constify llvm::Type, patch by David Blaikie!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
379010addb0e84fd0fbc37c829baf658958521bd 15-Jul-2011 John McCall <rjmccall@apple.com> Fix the definition of AsTypeExpr. I'm still not sure this
is right --- shouldn't there be a TypeLoc in here somewhere? ---
but at least it doesn't have a redundant QualType and a broken
children() method.

Noticed this while doing things in serialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
91a5755ad73c5dc1dfb167e448fdd74e75a6df56 15-Jul-2011 John McCall <rjmccall@apple.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8dd55a3c3b28d195717c87bbc60e765951d408fe 14-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Change intrinsic getter to take an ArrayRef, now that the underlying function in LLVM does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9cbe4f0ba01ec304e1e3d071c071f7bca33631c0 09-Jul-2011 Chris Lattner <sabre@nondot.org> clang side to match the LLVM IR type system rewrite patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
14ef3191a75b8bcdab391e6ffa6367b731c2ce67 07-Jul-2011 Bill Wendling <isanbard@gmail.com> Layout the code for trapping arithmetic so that the overflow case comes after
the normal case.

Before, for this:

$ cat t.c
int test(int x) { return x * 2; }

We would get this:

addl %edi, %edi
jno LBB0_2
## BB#1: ## %overflow
ud2
LBB0_2: ## %nooverflow
movl %edi, %eax
popq %rbp
ret

Now we get this:

addl %edi, %edi
jo LBB0_2
## BB#1: ## %nooverflow
movl %edi, %eax
popq %rbp
ret
LBB0_2: ## %overflow
ud2

<rdar://problem/8283919>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7e5e5f4cc36fe50f46ad76dca7a266434c94f475 07-Jul-2011 John McCall <rjmccall@apple.com> In ARC, reclaim all return values of retainable type, not just those
where we have an immediate need of a retained value.

As an exception, don't do this when the call is made as the immediate
operand of a __bridge retain. This is more in the way of a workaround
than an actual guarantee, so it's acceptable to be brittle here.

rdar://problem/9504800



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6594942e98e25640f226aba622eb76bcaf0a521c 25-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Cleanup cast IRGen a bit; no intended functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
545d996ec5a3113f046944f11b27cc2d6cb055b4 25-Jun-2011 John McCall <rjmccall@apple.com> LValue carries a type now, so simplify the main EmitLoad/Store APIs
by removing the redundant type parameter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
913dab2525cc705e5238023a446f5371fa411883 25-Jun-2011 John McCall <rjmccall@apple.com> Mark the multiply which occurs as part of performing pointer
arithmetic on a VLA as 'nsw', per discussion with djg, and
implement pointer arithmetic (other than array accesses) and
pointer subtraction for VLA types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bc8d40d85f3fa1e34569834916f18fecaa635152 24-Jun-2011 John McCall <rjmccall@apple.com> Change the IR-generation of VLAs so that we capture bounds,
not sizes; so that we use well-typed allocas; and so that we
properly recurse through the full set of variably-modified types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> Automatic Reference Counting.

Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
61eee0ca33b29e102f11bab77c8b74cc00e2392b 04-Jun-2011 Tanya Lattner <tonic@nondot.org> Add support for builtin astype:
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types.
Added test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
95d318c4c10437db40ca6e15fdf32e04012da58e 28-May-2011 Benjamin Kramer <benny.kra@googlemail.com> Eliminate temporary argument vectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
575a1c9dc8dc5b4977194993e289f9eda7295c39 20-May-2011 Douglas Gregor <dgregor@apple.com> Introduce Type::isSignedIntegerOrEnumerationType() and
Type::isUnsignedIntegerOrEnumerationType(), which are like
Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also
consider the underlying type of a C++0x scoped enumeration type.

Audited all callers to the existing functions, switching those that
need to also handle scoped enumeration types (e.g., those that deal
with constant values) over to the new functions. Fixes PR9923 /
<rdar://problem/9447851>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0eb47fc01849a94bac7fda236134f9301eff688b 19-May-2011 Eli Friedman <eli.friedman@gmail.com> Make __builtin_shufflevector and -ftrapv work correctly together. PR9945.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d4b9ee3b6ad82843c55909d6499232fce530113e 06-May-2011 Eli Friedman <eli.friedman@gmail.com> Don't emit nsw flags for vector operations; there's basically no benefit, and a lot of downside (like PR9850, which is about clang's xmmintrin.h making an unexpected transformation on an expression involving _mm_add_epi32).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
21ff2e516b0e0bc8c1dbf965cb3d44bac3c64330 28-Apr-2011 John Wiegley <johnw@boostpro.com> Implementation of Embarcadero array type traits

Patch authored by John Wiegley.

These are array type traits used for parsing code that employs certain
features of the Embarcadero C++ compiler: __array_rank(T) and
__array_extent(T, Dim).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
552622067dc45013d240f73952fece703f5e63bd 25-Apr-2011 John Wiegley <johnw@boostpro.com> t/clang/expr-traits

Patch authored by David Abrahams.

These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
48431f9c8c2a09df80da5999358f9cf85553e9b2 20-Apr-2011 Chris Lattner <sabre@nondot.org> some cleanups to use IRBuilder methods instead of llvm:: foo methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c6bea67efc38b075c401ebdb6ae97afa08cbb51d 17-Apr-2011 Chris Lattner <sabre@nondot.org> fix rdar://9289603 - clang should fold trivial ?: for enums as well as integer constants into select at -O0
by making the isCheapEnoughToEvaluateUnconditionally predicate handle anything that folds to a constant. In particular, we now fold enums.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f111d935722ed488144600cea5ed03a6b5069e8f 15-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> C1X: implement generic selections

As an extension, generic selection support has been added for all
supported languages. The syntax is the same as for C1X.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
755d8497e39071aa24acc173ff07083e3256b8f8 12-Apr-2011 John McCall <rjmccall@apple.com> After some discussion with Doug, we decided that it made a lot more sense
for __unknown_anytype resolution to destructively modify the AST. So that's
what it does now, which significantly simplifies some of the implementation.
Normal member calls work pretty cleanly now, and I added support for
propagating unknown-ness through &.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
379b5155b4566f63679e1da6b0ceb5fdfa2aec6d 11-Apr-2011 John McCall <rjmccall@apple.com> More __unknown_anytype work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
575b374fdbfc2c2224fd3047ac11ffc4b8db9ae5 11-Apr-2011 Anders Carlsson <andersca@mac.com> Remove CK_DynamicToNull.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7d99bc37e77157523e3bfbc6c077842b74e6690f 10-Apr-2011 Anders Carlsson <andersca@mac.com> As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which
represents a dynamic cast where we know that the result is always null.

For example:

struct A {
virtual ~A();
};
struct B final : A { };
struct C { };

bool f(B* b) {
return dynamic_cast<C*>(b);
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
52d6874271829c4f5bb70121fb678c27780ce65a 10-Apr-2011 Eli Friedman <eli.friedman@gmail.com> PR9580: Handle vectors correctly in ScalarExprEmitter::EmitRem.

While I'm here, FileCheck-ize the ext-vector test, so we actually check
what it is generating.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1de4d4e8cb2e9c88809fea8092bc6e835a5473d2 07-Apr-2011 John McCall <rjmccall@apple.com> Basic, untested implementation for an "unknown any" type requested by LLDB.
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use. I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bbf3bacb3e0c1ebb3e8a4a8b1330404a7e379315 30-Mar-2011 Jay Foad <jay.foad@gmail.com> Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
acd723666777b4ac1f79a97b6a300e6cf919d519 30-Mar-2011 Devang Patel <dpatel@apple.com> Fix in r128471 is very broad. Some of the unconditional branches need line number information for better user experience.
Restrict the fix. This fixes break.exp failures from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6305f721247f13707d9858b17d5696c1e3428a78 28-Mar-2011 Anton Yartsev <anton.yartsev@gmail.com> refactoring

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7870b133ac7b03bd53388f51250d009325f43399 27-Mar-2011 Anton Yartsev <anton.yartsev@gmail.com> AltiVec vector comparison logic now affect only vectors of fundamental AltiVec vector types. It fixes bug 9347.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a5bcb8fec45d127501cd70fe1654b5a08a8aeb35 16-Mar-2011 John McCall <rjmccall@apple.com> Don't emit read barriers for reading __weak __block variables
in non-GC mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f4e3cfbe8abd124be6341ef5d714819b4fbd9082 11-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for the OpenCL vec_step operator, by generalising and
extending the existing support for sizeof and alignof. Original
patch by Guy Benyei.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
aa11289f754d220c9c155b68a4f84cdcfcefef6a 07-Mar-2011 Devang Patel <dpatel@apple.com> DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5de7a0e8800b89780e565c1013e566414f11546a 07-Mar-2011 Devang Patel <dpatel@apple.com> Do not emit stop point for CXXDefaultArgExpr. It results in suboptimial user experience.

21 int main() {
22 A a;

For example, here user would expect to stop at line 22, even if A's constructor leads to a call through CXXDefaultArgExpr.

This fixes ostream-defined.exp regression from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
180ff3ac073c86bf7b5dbf48cfdfb7fc8252ce5f 02-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> IRGen. Fix IR when message returns reference type.
// rdar://8604515.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
fa0b409ef81f1f70edfa72857c4e211ff50998d5 02-Mar-2011 Eli Friedman <eli.friedman@gmail.com> PR9350: increment/decrement of char (and anything else narrower than int)
can't overflow due to promotion rules; emit a wrapping add for those cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2cb4222338669a3e70b546ef264fbd5d3f96aef5 01-Mar-2011 Chris Lattner <sabre@nondot.org> -fwrapv should turn off the inbounds markers from geps used for pointer
arithmetic. This is part of PR9256, it would be great if someone else
wired up -fno-strict-overflow in the driver to -fwrapv.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c2c90011a688c04a4e980282f08c267e081c4b00 28-Feb-2011 Chris Lattner <sabre@nondot.org> Change the interface to ConstantFoldsToSimpleInteger to not encode
a bool + success into one tri-state integer, simplifying things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
cf0b2d83666804b377dbe05370a5c9b9bafaaa5a 17-Feb-2011 John McCall <rjmccall@apple.com> Remove the "conditional save" hashtables from IR generation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
56ca35d396d8692c384c785f9aeebcf22563fe1e 17-Feb-2011 John McCall <rjmccall@apple.com> Change the representation of GNU ?: expressions to use a different expression
class and to bind the shared value using OpaqueValueExpr. This fixes an
unnoticed problem with deserialization of these expressions where the
deserialized form would lose the vital pointer-equality trait; or rather,
it fixes it because this patch also does the right thing for deserializing
OVEs.

Change OVEs to not be a "temporary object" in the sense that copy elision is
permitted.

This new representation is not totally unawkward to work with, but I think
that's really part and parcel with the semantics we're modelling here. In
particular, it's much easier to fix things like the copy elision bug and to
make the CFG look right.

I've tried to update the analyzer to deal with this in at least some
obvious cases, and I think we get a much better CFG out, but the printing
of OpaqueValueExprs probably needs some work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e996ffd240f20a1048179d7727a6ee3227261921 16-Feb-2011 John McCall <rjmccall@apple.com> Save a copy expression for non-trivial copy constructions of catch variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5936e33bf74dd6bf126ceee0f6169a2593d03a69 15-Feb-2011 John McCall <rjmccall@apple.com> Assorted cleanup:
- Have CGM precompute a number of commonly-used types
- Have CGF copy that during initialization instead of recomputing them
- Use TBAA info when initializing a parameter variable
- Refactor the scalar ++/-- code



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
fb018d153cbf12fd2a4a278cbf7614b9a2e2835e 15-Feb-2011 Chris Lattner <sabre@nondot.org> update for ConstantVector API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e69b09955acbde87470eea8bc99b580195569dc0 14-Feb-2011 Chris Lattner <sabre@nondot.org> revert my ConstantVector patch, it seems to have made the llvm-gcc
builders unhappy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1970d5fe94889a1c5ded3d821564363eb5c21020 14-Feb-2011 Chris Lattner <sabre@nondot.org> update for ConstantVector::get API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6b5a61b6dc400027fd793dcadceeb9da944a37ea 07-Feb-2011 John McCall <rjmccall@apple.com> A few more tweaks to the blocks AST representation:
- BlockDeclRefExprs always store VarDecls
- BDREs no longer store copy expressions
- BlockDecls now store a list of captured variables, information about
how they're captured, and a copy expression if necessary

With that in hand, change IR generation to use the captures data in
blocks instead of walking the block independently.

Additionally, optimize block layout by emitting fields in descending
alignment order, with a heuristic for filling in words when alignment
of the end of the block header is insufficient for the most aligned
field.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
683564a7a93c952f1fbe573b55c542418d29d859 07-Feb-2011 Anton Yartsev <anton.yartsev@gmail.com> pre/post ++/-- for AltiVec vectors. (with builtins-ppc-altivec.c failure fixed)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5808ce43f8d7e71f5acacc9ca320268c4f37565a 03-Feb-2011 John McCall <rjmccall@apple.com> More capturing of 'this': implicit member expressions. Getting that
right for anonymous struct/union members led to me discovering some
seemingly broken code in that area of Sema, which I fixed, partly by
changing the representation of member pointer constants so that
IndirectFieldDecls aren't expanded. This led to assorted cleanups with
member pointers in CodeGen, and while I was doing that I saw some random
other things to clean up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
150b462afc7a713edd19bcbbbb22381fe060d4f5 26-Jan-2011 John McCall <rjmccall@apple.com> Better framework for conditional cleanups; untested as yet.
I'm separately committing this because it incidentally changes some
block orderings and minor IR issues, like using a phi instead of
an unnecessary alloca.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5af1f066230be7571cffb408048479ad0f06f75e 25-Jan-2011 Eric Christopher <echristo@apple.com> Revert r124146 for now. It appears to be failing on a few platforms.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e07ae4ee00baedcfc2c59fb2a7500dbec08371e9 24-Jan-2011 Anton Yartsev <anton.yartsev@gmail.com> pre/post increase/decrease for AltiVec vectors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
da29e091650dc011df5209578d7c049549e5e34b 22-Jan-2011 Douglas Gregor <dgregor@apple.com> Send code generation for xvalues down the same path as lvalues

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f4c7371fb1d3cebcfb40abad4537bb82515704ea 19-Jan-2011 John McCall <rjmccall@apple.com> Change QualType::getTypePtr() to return a const pointer, then change a
thousand other things which were (generally inadvertantly) relying on that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
fe71008c2764768f25478b16c1802755189ed7c9 19-Jan-2011 Ken Dyck <kd@kendyck.com> Replace calls to getTypeSize() and getTypeAlign() with their 'InChars'
counterparts where char units are needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8d3d6c93551cc62c6d550f090991bfba1d32d0a4 13-Jan-2011 John McCall <rjmccall@apple.com> Ensure an insertion point at the end of a statement-expression.
Fixes PR8967.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9370c8f4af43a98a6f16e65f5d88d58db846e374 12-Jan-2011 Douglas Gregor <dgregor@apple.com> Add IR generation support for SizeOfPackExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f187237d916afa97c491ac32fe98be7d335c5b63 08-Dec-2010 Francois Pichet <pichet2000@gmail.com> Remove the TypesCompatibleExprClass AST node. Merge its functionality into BinaryTypeTraitExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6ad6f2848d7652ab2991286eb48be440d3493b28 07-Dec-2010 Francois Pichet <pichet2000@gmail.com> Type traits intrinsic implementation: __is_base_of(T, U)
New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4765fa05b5652fcc4356371c2f481d0ea9a1b007 06-Dec-2010 John McCall <rjmccall@apple.com> Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2a41637a995affa1563f4d82a8b026e326a2faa0 05-Dec-2010 John McCall <rjmccall@apple.com> Fix a bug in the emission of __real/__imag l-values on scalar operands.
Fix a bug in the emission of complex compound assignment l-values.
Introduce a method to emit an expression whose value isn't relevant.
Make that method evaluate its operand as an l-value if it is one.
Fixes our volatile compliance in C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
fd569004b78124c1041feee75a1e311166268c8d 04-Dec-2010 John McCall <rjmccall@apple.com> Silly special case: never load when dereferencing void*.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f6a1648197562e0b133440d612d9af297d0a86cc 04-Dec-2010 John McCall <rjmccall@apple.com> Although we currently have explicit lvalue-to-rvalue conversions, they're
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.

In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.

This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.

Ted Kremenek kindly contributed the analyzer workarounds in this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
119a1c6c4029d30cae7b31a2826aa0ff70d01668 04-Dec-2010 John McCall <rjmccall@apple.com> Kill the KVC l-value kind and calculate the base expression when emitting
the l-value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
12f78a6741a4cb3d904340f8d3d2714568b50e7a 02-Dec-2010 John McCall <rjmccall@apple.com> Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
into the latter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0ae287a498b8cec2086fe6b7e753cbb3df63e74a 01-Dec-2010 John McCall <rjmccall@apple.com> Restore the lvalue-to-rvalue conversion patch with a minimal fix.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
20fbe7c4772d537c1f779b1ff89cbb57d1d9afff 30-Nov-2010 John McCall <rjmccall@apple.com> L-value to r-value conversion is not ready for prime-time.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7e4857931bfe27bb355275bc7ec1eaa44612dfff 30-Nov-2010 John McCall <rjmccall@apple.com> Introduce an r-value to l-value cast kind. I'm not promising anything
about the reliability of this yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7eb0a9eb0cde8444b97f9c5b713d9be7a6f1e607 24-Nov-2010 John McCall <rjmccall@apple.com> Switch a lot of call-sites over to using the new value-kind calculations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
aa4fe05939ffbfd746b8f0065cc0b5e06ea94fe2 18-Nov-2010 Anton Yartsev <anton.yartsev@gmail.com> comparison of AltiVec vectors now gives bool result (fix for 7533)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
b418d74c11498b7e1044103131e2e3be4d63512e 16-Nov-2010 John McCall <rjmccall@apple.com> Simplify some complex emission and implement correct semantics for
assignment to volatiles in C. This in effect reverts some of mjs's
work in and around r72572. Basically, the C++ standard is quite
clear, except that it lies about volatile behavior approximating
C's, whereas the C standard is almost actively misleading.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
61ad0e6f40555a6bf589cbc7849c25f2b35efae4 16-Nov-2010 John McCall <rjmccall@apple.com> Now that we have reliable cast kinds, simplify scalar cast IR gen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e2b768877b77fa4e00171ee6e6443722e0f3d111 16-Nov-2010 John McCall <rjmccall@apple.com> Kill CK_Unknown and flesh out the documentation for the existing CastKinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
daa8e4e888758d55a7a759dd4a91b83921cef222 15-Nov-2010 John McCall <rjmccall@apple.com> Assorted work leading towards the elimination of CK_Unknown.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f3ea8cfe6b1c2ef0702efe130561e9e66708d799 14-Nov-2010 John McCall <rjmccall@apple.com> Add a few more complex-related cast kinds that arise due to arbitrary
implicit conversions; the last batch was specific to promotions.
I think this is the full set we need. I do think dividing the cast
kinds into floating and integral is probably a good idea.

Annotate a *lot* more C casts with useful cast kinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2bb5d00fcf71a7b4d478d478be778fff0494aff6 13-Nov-2010 John McCall <rjmccall@apple.com> Introduce five new cast kinds for various conversions into and
between complex types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
404cd1669c3ba138a9ae0a619bd689cce5aae271 13-Nov-2010 John McCall <rjmccall@apple.com> Introduce a null-to-pointer implicit cast kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a14f5979572aa25c03d24750ee4724d2031d4ede 01-Nov-2010 Anders Carlsson <andersca@mac.com> Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
79ba2a6379f87fa137377c3f55ff993b9e5cc144 22-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> More class anonymization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
189d6ef40eff11b83b2cda941d5ed89a5cef09b2 09-Oct-2010 John McCall <rjmccall@apple.com> Permit constant evaluation of const floating-point variables with
constant initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
cedbf43c90d8850106ec3d0da5dca65267137a0b 08-Oct-2010 Devang Patel <dpatel@apple.com> Tighter check in r116060 blcoked enums also. Emit enum const's debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
67c32268c0891b539fe9da26d10579e2ebfc9b38 08-Oct-2010 Devang Patel <dpatel@apple.com> Do not repeat debug info for file variable constants.
This is tested by file-statics.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
49c8465f14fc3b2e1a32c7016ad3fb4e2cf8d466 05-Oct-2010 Devang Patel <dpatel@apple.com> dyn_cast is more appropriate here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7fa8ab2e77f5703d0adf14e4d98f1edc1e66505d 05-Oct-2010 Devang Patel <dpatel@apple.com> Add missing '}' :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
78ba3d46388f17b4fc5e63ed23b746dd4dea9547 04-Oct-2010 Devang Patel <dpatel@apple.com> Emit debug info for an aggregate while processing MemberExpr if the aggregate's debug info was delayed untill now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
745da3a5bb4ea35f93f50301e7fbbb7d78d3b6bb 24-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch implements passing arrays to functions expecting
vla. Implements pr7827.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f4435703872acb6eb0ff01b52414584e08d9ee35 22-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes an IRgen ICE due to cast of null pointer to
a vla type (fixes pr7827).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6155d73ad1668be5335b1a060f6c49c03d4dca05 21-Sep-2010 Nate Begeman <natebegeman@mac.com> Check in support for OpenCL conditional operator on vector types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7f18e67e1b577a50402e8b43508ab2311a5c45b5 17-Sep-2010 David Chisnall <csdavec@swan.ac.uk> Add a -ftrapv-handler= option which allows a handler to invoke instead of simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
af9b96828f9126d993c3e155b8453be62013b735 17-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to add IRgen support for Gnu's conditional operator
extension when missing LHS. This patch covers scalar
conditionals only. Others are wip.
(pr7726, radar 8353567).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
558d2abc7f9fd6801cc7677200992313ae90b5d8 15-Sep-2010 John McCall <rjmccall@apple.com> one piece of code is responsible for the lifetime of every aggregate
slot. The easiest way to do that was to bundle up the information
we care about for aggregate slots into a new structure which demands
that its creators at least consider the question.

I could probably be convinced that the ObjC 'needs GC' bit should
be rolled into this structure.
Implement generalized copy elision. The main obstacle here is that
IR-generation must be much more careful about making sure that exactly



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0dfd848fa4c9664852ba8c929a8bd3fce93ddca2 13-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Eagerly evaluate type traits in Sema instead of lazily in AST. They actually need Sema access to be correct, fixes coming up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8023030f76d334355b73d9c675d3870858aaf4fd 11-Sep-2010 Chris Lattner <sabre@nondot.org> Augment -ftrapv to check for divide by zero, mod by zero, and INT_MIN % -1.

Patch by John Regehr!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
98294def01c97e127fa6d812ebd944d37212828a 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Implement CXXNoexceptExpr codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
699c06068dab18efd37897659ec120d211827607 04-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Casting of a property reference to 'void' did not
generate the necessary code. This patch fixes it.
// rdar://8389655


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
469a20de757ff872c90ff6b1134f6346909ff652 04-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Truncate block variable of bool type to i1 when its
value is used. This matches with non-block variable
use of bool type. (Fixes radar 8390062).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
db50547fd526329d00fa1fee4e7ac90f2624c6e0 03-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix silly thinko in r112021, which was generating code for the same expr
twice. This showed up as an assert on the odd test case because we generated the
decl map entry twice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4c40d98ab7acf5f27fa89b17bd8fc0ef7683df37 31-Aug-2010 John McCall <rjmccall@apple.com> Teach IR generation to return 'this' from constructors and destructors
under the ARM ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6cf750298d3621d8a10a6dd07fcee8e274b9d94d 30-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert my user-defined literal commits - r1124{58,60,67} pending
some issues being sorted out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
75b8508380e6d44276a8fafe5cafcedb9cf532d3 30-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Two minor fixes to user-defined literals:

- Zero-initialize UDLData so that crashes stop
- Stop complaining that we can't emit them (we most certainly can)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2de56d1d0c3a504ad1529de2677628bdfbb95cd4 25-Aug-2010 John McCall <rjmccall@apple.com> GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5baba9d98364a3525d6afa15a04cdad82fd6dd30 25-Aug-2010 John McCall <rjmccall@apple.com> More incremental progress towards not including Expr.h in Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
89f176d89aefe8a23bbf0ace9b329562f4970d5f 25-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix a horrible bug in pointer to bool conversion, which we were treating
as a truncation not a comparison to null.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5d743fa747281dbecbc0d557035ca44f8a26a342 23-Aug-2010 Douglas Gregor <dgregor@apple.com> Emit an error noting that Clang does not support code generation for
the ternary operator without a left-hand side in C++ (PR7726), from
Jean-Daniel Dupas!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0bab0cdab751248ca389a5592bcb70eac5d39260 23-Aug-2010 John McCall <rjmccall@apple.com> Abstract out everything having to do with member pointers into the ABI
class; they should just be completely opaque throughout IR gen now,
although I haven't really audited that.

Fix a bug apparently inherited from gcc-4.2 where we failed to null-check
member data pointers when performing derived-to-base or base-to-derived
conversions on them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
db68e28c05a67735211e688009890cf834c22e75 22-Aug-2010 Douglas Gregor <dgregor@apple.com> Eliminate a stale assertion. Fixes Clang self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d608cdb7c044365cf4e8764ade1e11e99c176078 22-Aug-2010 John McCall <rjmccall@apple.com> Experiment with using first-class aggregates to represent member function
pointers. I find the resulting code to be substantially cleaner, and it
makes it very easy to use the same APIs for data member pointers (which I have
conscientiously avoided here), and it avoids a plethora of potential
inefficiencies due to excessive memory copying, but we'll have to see if it
actually works.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e9fd7eb6c67676dc27e84eac429aec4f3be51f26 22-Aug-2010 John McCall <rjmccall@apple.com> Extract member function pointer comparison and null comparison into
the ABI code. Implement correct semantics for these on ARM.

I believe this completes the implementation of member function pointers
on ARM.

I think I'm going to switch member function pointers over to be
non-aggregates while I have all this in mind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111774 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9f553f5b3bd45304dfda6bdc5cd2baac64b3315b 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Switch a bunch of trivial MakeAddr calls to use MakeAddrLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
de7e66256b1bdfcf6526994825a8c8fced52a31c 13-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Zap unused UnaryOperator::OffsetOf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
25c2c8fb9309050612009a6571e2660e75531348 10-Aug-2010 Devang Patel <dpatel@apple.com> Simplify code and add comments, in code that generate debug info for constant integer globals, based on Chris's feedback.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8d308384a220c7dc81755c47cdcbdd87dac25d5b 10-Aug-2010 Devang Patel <dpatel@apple.com> Even if a constant's evaluated value is used, emit debug info for the constant variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
569c3166874324c24011f8ade6978421f0d39b3c 07-Aug-2010 Douglas Gregor <dgregor@apple.com> Allow reference binding of a reference of Objective-C object type to
an lvalue of another, compatible Objective-C object type (e.g., a
subclass). Introduce a new initialization sequence step kind to
describe this binding, along with a new cast kind. Fixes PR7741.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f871d0cc377a1367b519a6cce26be74607566eba 07-Aug-2010 John McCall <rjmccall@apple.com> Store inheritance paths after CastExprs instead of inside them.
This takes some trickery since CastExpr has subclasses (and indeed,
is abstract).

Also, smoosh the CastKind into the bitfield from Expr.

Drops two words of storage from Expr in the common case of expressions
which don't need inheritance paths. Avoids a separate allocation and
another word of overhead in cases needing inheritance paths. Also has
the advantage of not leaking memory, since destructors for AST nodes are
never run.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
93a00357f2795404c6709d9e06b4f717c82e6efb 07-Aug-2010 Chris Lattner <sabre@nondot.org> Correct -ftrapv to trap on errors, instead of calling the
__overflow_handler entrypoint that David Chisnall made up.
Calling __overflow_handler is not part of the contract of
-ftrapv provided by GCC, and should never have been checked
in in the first place.

According to:
http://permalink.gmane.org/gmane.comp.compilers.clang.devel/8699

David is using this for some of arbitrary precision integer stuff
or something, which is not an appropriate thing to implement on
this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
16fd39fb11cce33d58ecdd39f25540b85c1542b4 06-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Initialize variable to work around warning; unfortunately, there isn't any
way to tell gcc "really, values outside the enum aren't valid".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6d4e44b462fe9e870a40358522379400ccc6e3c2 06-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Attempt to fix uninitialized value warning reported on cfe-commits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3bd94d6d1e8879f072f92e341f2c557ac91ab853 05-Aug-2010 John McCall <rjmccall@apple.com> Argument evaluation order is not guaranteed. Split these out to force an order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
401be6bddcf05ac2828730e0bb4e8b81931f8296 05-Aug-2010 John McCall <rjmccall@apple.com> Fix a major bug with -ftrapv and ++/--. Patch by David Keaton!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0027d2bb24db629a33a71d04a5fb90a14c15a680 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Add IRGen support for non-constant OffsetOfExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f60946222721d9ba3c059563935c17b84703187a 23-Jul-2010 Douglas Gregor <dgregor@apple.com> Vectors are not integer types, so the type system should not classify
them as such. Type::is(Signed|Unsigned|)IntegerType() now return false
for vector types, and new functions
has(Signed|Unsigned|)IntegerRepresentation() cover integer types and
vector-of-integer types. This fixes a bunch of latent bugs.

Patch from Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
906082edf2aea1c6de2926f93a8d7121e49d2a54 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Update ImplicitCastExpr to be able to represent an XValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e39a3894513349908cdb3beba2614e53cb288e6c 14-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new cast kind for an "lvalue bitcast", which handles
reinterpret_casts (possibly indirectly via C-style/functional casts)
on values, e.g.,

int i;
reinterpret_cast<short&>(i);

The IR generated for this is essentially the same as for

*reinterpret_cast<short*>(&i).

Fixes PR6437, PR7593, and PR7344.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ed8abf18329df67b0abcbb3a10458bd8c1d2a595 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Reinstate the fix for PR7556. A silly use of isTrivial() was
suppressing copies of objects with trivial copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
84745677f64863e025a6733cb29d0b94bc3a6ae2 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Revert r107828 and r107827, the fix for PR7556, which seems to be
breaking bootstrap on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
016a4a90c8e75d59de731fa3aa98f0a55656e66c 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect its
newly-narrowed scope. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d7f7d0895dc43db20c43112a24684f11eed305de 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Assignment to Objective-C properties shouldn't reload the value (which
would trigger an extra method call).
- While in the area, I also changed Clang to not emit an unnecessary load from
'x' in cases like 'y = (x = 1)'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4ac0d83090c750bd8ab2c4fc91a6a44c32884cb3 28-Jun-2010 Chris Lattner <sabre@nondot.org> Fix UnitTests/2004-02-02-NegativeZero.c, which regressed when
I broke negate of FP values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
77b89b87c3b9220fea1bc80f6d6598d2003cc8a8 27-Jun-2010 Chris Lattner <sabre@nondot.org> finally get around to doing a significant cleanup to irgen:
have CGF create and make accessible standard int32,int64 and
intptr types. This fixes a ton of 80 column violations
introduced by LLVMContextification and cleans up stuff a lot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
640d3267228415328c0feb2bcc35757230ab4db7 27-Jun-2010 Chris Lattner <sabre@nondot.org> fix inc/dec to honor -fwrapv and -ftrapv, implementing PR7426.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8c11a65c18ae607b7073e1e451264492d2297726 27-Jun-2010 Chris Lattner <sabre@nondot.org> move scalar inc/dec codegen into ScalarExprEmitter instead
of being in CGF. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7f215c12af4c3e7f81b24102a676aabfdb4e1566 26-Jun-2010 Chris Lattner <sabre@nondot.org> use more efficient type comparison predicates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9a20723df5904f2da9e4da14bf127366609b5cd8 26-Jun-2010 Chris Lattner <sabre@nondot.org> Fix unary minus to trap on overflow with -ftrapv, refactoring binop
code so we can use it from VisitUnaryMinus.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a4d71455f0d418e16cc0c5c5aa55a3bad3494aee 26-Jun-2010 Chris Lattner <sabre@nondot.org> Implement support for -fwrapv, rdar://7221421

As part of this, pull together trapv handling into the same enum.

This also add support for NSW multiplies.

This also makes PCH disagreement on overflow behavior silent, since it
really doesn't matter except for warnings and codegen (no macros get
defined etc).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e70ffd631179c15d358838464425e3464cf05a98 26-Jun-2010 Chris Lattner <sabre@nondot.org> implement rdar://7432000 - signed negate should codegen as NSW.
While I'm in there, adjust pointer to member adjustments as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3f4cb120fe574f7b80864f52a1999502a4f3a83d 09-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix a gcc warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
37b6a5731a47f811d754f0d48aa93edf30e30513 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Extend __builtin_shufflevector to expose the full power of the llvm shufflevector instruction. This means it can now be used for vector truncation and concatenation. This will be used for the ARM NEON implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a40a9f31218c743e366322e34b59f0d4d4414198 22-May-2010 Anders Carlsson <andersca@mac.com> Really fix PR7139. There was one boost test that we still failed, and my first fix broke self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
892fa6c5e152dd22e4ba460d5c8cd5c79d657e87 22-May-2010 Anders Carlsson <andersca@mac.com> Unbreak self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
db9b12e32c988e4a6ac49404fd2513d0b05bba32 21-May-2010 Anders Carlsson <andersca@mac.com> Rename CodeGenFunction::EmitMemSetToZero to EmitNullInitialization. Handle setting null data member pointers correctly. Fixes PR7139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44e 15-May-2010 John McCall <rjmccall@apple.com> Substantially alter the design of the Objective C type AST by introducing
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.

Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.

By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3cb18bcefe39756f3b079fa1a62b4c9cbf6a592f 14-May-2010 Anders Carlsson <andersca@mac.com> Make sure that value-initialized pointers to data members are initialized correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8ecdb65716cd7914ffb2eeee993fa9039fcd31e8 29-Apr-2010 Douglas Gregor <dgregor@apple.com> Completely reimplement __builtin_offsetof, based on a patch by Roberto
Amadini.

This change introduces a new expression node type, OffsetOfExpr, that
describes __builtin_offsetof. Previously, __builtin_offsetof was
implemented using a unary operator whose subexpression involved
various synthesized array-subscript and member-reference expressions,
which was ugly and made it very hard to instantiate as a
template. OffsetOfExpr represents the AST more faithfully, with proper
type source information and a more compact representation.

OffsetOfExpr also has support for dependent __builtin_offsetof
expressions; it can be value-dependent, but will never be
type-dependent (like sizeof or alignof). This commit introduces
template instantiation for __builtin_offsetof as well.

There are two major caveats to this patch:

1) CodeGen cannot handle the case where __builtin_offsetof is not a
constant expression, so it produces an error. So, to avoid
regressing in C, we retain the old UnaryOperator-based
__builtin_offsetof implementation in C while using the shiny new
OffsetOfExpr implementation in C++. The old implementation can go
away once we have proper CodeGen support for this case, which we
expect won't cause much trouble in C++.

2) __builtin_offsetof doesn't work well with non-POD class types,
particularly when the designated field is found within a base
class. I will address this in a subsequent patch.

Fixes PR5880 and a bunch of assertions when building Boost.Python
tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e04d45e05277ee04997fe59b1d194503f484c846 24-Apr-2010 Anders Carlsson <andersca@mac.com> Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to use the new version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a04efdf635d35d88e65041fad007225d8c8d64a5 24-Apr-2010 Anders Carlsson <andersca@mac.com> Change CodeGenFunction::GetAddressOfDerivedClass to take a BasePath.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
34a2d384c745ebc39cae45dc1c0c4a6a7012e09b 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add a new GetAddressOfBaseClass overload that takes a base path and. Use it for derived-to-base casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6a03e345bb3c971750920e34a0d7d1ea7c9eceb7 23-Apr-2010 Douglas Gregor <dgregor@apple.com> Handle compound assignment expressions (i += j) as lvalues, which is
permitted in C++ but not in C. Fixes PR6900. Clang can now handle all
of Boost.Lambda's regression tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f0fe5bc0e46038dc79cdd27fcf0c77ad4789fdff 05-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.
- Unfortunately, this requires some horrible code in CGObjCMac which always
allocats a CGBitFieldInfo because we don't currently build a proper layout
for Objective-C classes. It needs to be cleaned up, but I don't want the
bit-field cleanups to be blocked on that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
23cba801e11b03929c44f8cf54578305963a3476 31-Mar-2010 John McCall <rjmccall@apple.com> Introduce a new kind of derived-to-base cast which bypasses the need for
null checks, and make sure we elide null checks when accessing base class
members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2eb91e4812d54a1cf634c265a16633a3d3edcf91 29-Mar-2010 Chris Lattner <sabre@nondot.org> emit signed integer subtractions as 'sub nsw', patch by
Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9f9efe6d58f49bce01b548bf81245f053b632a02 03-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Fix code gen bug generating code for
((id)cat)->isa. Fixes radar 7709015.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f177d9d6c27fbbcee8c00fd90b8306985c03c54a 15-Feb-2010 Duncan Sands <baldrick@free.fr> Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5ed676c90c839c89093b605d76c7e581ab69ebb8 05-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a code gen bug accessing 'isa' field via a message call
(Fixes radar 7609722).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
72119a887c4af39c90f10b6bdc158389071f42ea 04-Feb-2010 Anders Carlsson <andersca@mac.com> Rename StartConditionalBranch/FinishConditionalBranch to BeginConditionalBranch/EndConditionalBranch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
45147d0098a34c3705f74ca121b27d7736ac113a 02-Feb-2010 Anders Carlsson <andersca@mac.com> Move pointer to data member emission to CodeGenModule and use it in CGExprConstant. Fixes PR5674.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bb7e17b52ffaa4097b4c4d7935746d23539ffe2a 31-Jan-2010 Anders Carlsson <andersca@mac.com> Some class related cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
199c3d6cd16aebbb9c7f0d42af9d922c9628bf70 11-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Roll out ASTContext::getTypeSizeInChars(), replacing instances of
"ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits
ones as appropriate.

Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType,
fromQuantity(), and getQuantity() for clarity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
dd36d328730d8c02915d0884541b45ec6ca0049d 09-Jan-2010 Chris Lattner <sabre@nondot.org> refactor pre/postinc logic into CGF and require the caller to pass in the
lvalue to poke, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
696f87bc39652992516fa7ca8399c38f3faae826 03-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Get rid of more dead code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
54d76db0aa7107597cac0b80d8e138a37e6d1de9 25-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove some dead variables clang-analyzer found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7177dee8aee4b432911c91f1b788963bec0cac9f 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> Remove ';' after method definition. Noticed by clang++, which one would think
would have a higher respect for its own code. This is getting old, is this
warning really adding value?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0ddb6f7506d3bffe4e526f877d3ef48e8d942b1d 18-Dec-2009 Anders Carlsson <andersca@mac.com> It's perfectly fine to see UserDefinedConversion casts when emitting scalar expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
b14e62d5aee7522b98c410ee65bd750c2cfe6f01 16-Dec-2009 Mike Stump <mrs@apple.com> Implement additional undefined checks for additional loads and stores. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
15037caa1542bb810ad54c653aeb80f61df7b00c 15-Dec-2009 Mike Stump <mrs@apple.com> Switch codegen for -fcatch-undefined-bahavior over to __builtin_trap
instead of abort to improve codesize and codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
be07f60131bc6f8d6696f4644df1ef667a1730d5 14-Dec-2009 Mike Stump <mrs@apple.com> Add support for detecting undefined shift behavior. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3b27f1a80e4e433b503efd344c909eeafaa9033c 11-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allow C-style cast from 'void *' to block pointer type.
(fixes radar 7465023).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3a1737030e3c8d209987325c61dacb8e4a65123b 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Move the code for converting a member pointer to a bool so that it is usable
for logical not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
b81c786de58ce484230dc04f9a7c78bc48990106 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5718: implement equality comparisons for member function pointers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9dfebdcdcdcc0cad8a3ef205d33b84f33233072b 10-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Support unary type traits in a scalar context. Not that I've actually seen
this construct, but might as well for completeness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
820bca41c3899374775d2a1dfc2ef2e22aaf1c7b 10-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for ObjCIsaExpr AST used as lvalue.
(fixes radar 7457534).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
83dc32594cde6bd083bd8b98b24bde2346585cad 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Codegen. support for ObjCIsaExpr AST which until now
was not needed (fixes radar 7453430).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
92ef5d75720c032808181133e4d7c5f82230237e 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> More detailed analysis of typecast to an objective-c pointer
in objective-c++ mode without being too lenient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
48daf59c9f52856ca80074f1f5a30aa29c235726 07-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Correctly handle conditional operators involving throw.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2da84ff228a231adbd3f6f236b857f752d02959a 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't pass false (default) for isVolatile parameter to CreateLoad.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
85b4521e34dcd4a0a4a1f0819e1123128e5a3125 28-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d888962cff03b543fbe9ac6051ec6addf5b993b4 27-Nov-2009 Eli Friedman <eli.friedman@gmail.com> More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, either
implement it explicitly or assert that it doesn't make sense for a scalar.
This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer
casts were getting silently miscompiled, and two, Sema was constructing some
strange implicit casts of type CK_UserDefinedConversion.

The change in SemaExprCXX makes sure the cast kinds are getting set correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8c3e7e7ddafe26f236741fb25e2898be4f3230ea 27-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Cleanup for ScalarExprEmitter::EmitCastExpr; no functional changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
28665272c36cccb1014a6ea1217354b0519e2b59 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Use the more general Evaluate infrastructure for folding constant DeclRefs
instead of checking explicitly for an EnumConstantDecl. This folds references
to constant integer VarDecls, which has two benefits:

1. Slightly smaller emitted code from emitting a constant instead of a load,
and skipping emitting some constant globals.
2. Some code forgets to define static constant member variables; emitting a
load instead of the value in that case leads to a link error. (Such programs
are technically not well-formed, but in practice build with g++.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c102297fb2857ef1af191a8e85e842cc3ac3239e 24-Nov-2009 Anders Carlsson <andersca@mac.com> We always need to emit the base expression of a member expression, even when the member decl refers to an enum. Thanks to Eli for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a1b29a74eb702067f18f4cac184bc705e915fd6b 23-Nov-2009 Anders Carlsson <andersca@mac.com> Don't try to treat an enum constant as an lvalue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bc0e0781da778bd5eb41a810419912893ae20448 23-Nov-2009 Anders Carlsson <andersca@mac.com> Handle converting member pointers to bool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a3697c9c155bda93fd2802f37084b620f4738822 23-Nov-2009 Anders Carlsson <andersca@mac.com> Handle base-to-derived casts. Will land test case shortly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a36bf8f74180e834c6bf2db867796fd5338495ab 20-Nov-2009 Anders Carlsson <andersca@mac.com> Fix lifetime of conditional temporaries. Patch by Victor Zverovich!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
25b825d1a48fb4d64cb553bef7a316469e89c46a 18-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup to member pointer handling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ad35a83102683b00a7e28707eee7f2d8c994b742 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Clean up scalar cast kind handling; make cast kind handling explicitly handle
more cases. No intended visible change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c849c052d6b4b70f2651c1969531861a5f230053 16-Nov-2009 Mike Stump <mrs@apple.com> Implement most of dynamic_cast. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
41a124aba77e07ab6263239bdb3df6f5feb34e13 06-Nov-2009 Chris Lattner <sabre@nondot.org> indirectbr seems to work! Rip out the old code.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
df317bf71653eeb235da8337b1e8e790f9653aa4 04-Nov-2009 Mike Stump <mrs@apple.com> Refine volatile handling, specifically, we must have the canonical
type to look at the volatile specifier. I found these all from just
hand auditing the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
756b5c4f9d52642d87d1948bee58f97a4f795b24 30-Oct-2009 Anders Carlsson <andersca@mac.com> Add CGException.cpp, to be used for exception related code generation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d9becd1846e2c72bf6ad283faa1b048f33dd3afe 29-Oct-2009 Chris Lattner <sabre@nondot.org> Implement clang support for indirect branch and address of label
using the new LLVM support for this. This is temporarily hiding
behind horrible and ugly #ifdefs until the time when the optimizer
is stable (hopefully a week or so). Until then, lets make it "opt in" :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a99f08351b6df3bb0f2947e038747717a60fd93a 25-Oct-2009 Nate Begeman <natebegeman@mac.com> Fix a bug in calculating shufflevector indices when constructing vectors from other vectors.
If I can find it again, I will check in a testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8bfd31f9dad09cd52225d868bbd92a9bebe87775 23-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Complete code gen for '.*' binary expression for
both scalar and aggregates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
467b27b9a24bdc823218ad1ad0e37673b6cc1e83 22-Oct-2009 John McCall <rjmccall@apple.com> Canonicality is a property of qualified types, not unqualified types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f51dc64f90851f636302dbaaf3f52c0524cdac36 22-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for '.*' binary expressions - WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0533b3020ca39898751d4200feed776861dcd1ce 18-Oct-2009 Nate Begeman <natebegeman@mac.com> Support IRgen of OpenCL vector initializers, ensuring the resulting IR is in a
form that LLVM code generators can turn into efficient code. For example,
int4 a, b, c;
a = (int4)(b.yzw, a.x)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
82debc7d282e723e58d183bfa89ddc2500a8daaf 18-Oct-2009 Anders Carlsson <andersca@mac.com> Add some more cast kinds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7804bcba90bf5ea8ec6cd0f6cc9a64577f1a9259 17-Oct-2009 Chris Lattner <sabre@nondot.org> Fix PR5211: codegen shouldn't assume that the result of ||/&& is int
anymore. In C++ it is bool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3c0ef8cc0dc246bd3083e8cdd63005e8873d36d2 13-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Simplify pointer creation with the new Type::getInt*Ptr methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f7bcc7e6c803a2b2f7b7f7fdfb2506dd25ec6de8 10-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Generate weak read barriers when reading a weak __block
variable inside the block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ffbb15e54a6dc120087003d1e42448b8705bd58a 05-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Use new predicates for some type equality tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0953e767ff7817f97b3ab20896b229891eeff45b 24-Sep-2009 John McCall <rjmccall@apple.com> Refactor the representation of qualifiers to bring ExtQualType out of the
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
45504e568c6f8fedc4457ed563eab65d8ab7f87d 23-Sep-2009 Mike Stump <mrs@apple.com> Remove now fixed FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
592a2bbc1945358ab8ebf0d74c57f0b23c4434c0 23-Sep-2009 Anders Carlsson <andersca@mac.com> No need to null check implicit lvalue cast exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
183700f494ec9b6701b6efe82bcb25f4c79ba561 22-Sep-2009 John McCall <rjmccall@apple.com> Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.

The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7f9e646b7ed47bc8e9a60031ad0c2b55031e2077 15-Sep-2009 Anders Carlsson <andersca@mac.com> Handle reinterpret_cast between integral types and pointer types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c1eb14a66fdd955aff3f957a5843295f27952bdd 15-Sep-2009 Anders Carlsson <andersca@mac.com> Codegen support for nullptr from C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
32baf62b9a3aea3b63be6925b64aa182b0a2278e 12-Sep-2009 Anders Carlsson <andersca@mac.com> When necessary, null check the base value in GetAddressCXXOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
191dfe909d6cc18e9134ac23ac4daaedeceb862f 12-Sep-2009 Anders Carlsson <andersca@mac.com> Handle derived-to-base conversion in CGExprScalar::EmitCast, if the cast kind is CK_DerivedToBase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5a0f49ebc83e7fe0da07b9964c44b0a7fae270cb 12-Sep-2009 Anders Carlsson <andersca@mac.com> Rename AddressCXXOfBaseClass to GetAddressCXXOfBaseClass. Add a NullCheckValue argument (currently unused).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0aebc81e02397a5987aaa8e8c7acbdb01a31d7c3 09-Sep-2009 Anders Carlsson <andersca@mac.com> If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
db52dcdae7d2e25565096d07ee74fa307061cc32 09-Sep-2009 Mike Stump <mrs@apple.com> Reflow comments and some minor whitespace fixups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a71d819bb8f50c28938db0f2867d3fb6e2ce5910 04-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement AST, semantics, and CodeGen for C++ pseudo-destructor
expressions, e.g.,

p->~T()

when p is a pointer to a scalar type.

We don't currently diagnose errors when pseudo-destructor expressions
are used in any way other than by forming a call.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
cb3c308ef0e63b2902911b985517309c26f975dc 01-Sep-2009 Anders Carlsson <andersca@mac.com> Use the correct cast kinds for bit casts and function to pointer decay. Fixes PR4827.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
31976591dee494994f2546c72c23e1e35a9c1555 29-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for code gen. for c-style cast which ends in
using class's conversion functions [12.3.2-p2]


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
64e690ecf7ba7ad560b0af631bb6f323c38f6da4 27-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for type convesion of class objects. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
504bf55195ccbf84e016a0c7759669dee2975ba3 24-Aug-2009 Anders Carlsson <andersca@mac.com> Handle array to pointer decay in EmitCastExpr and get rid of VisitImplicitCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e9776247577715ad3a19461769a3488a445a8cbd 24-Aug-2009 Anders Carlsson <andersca@mac.com> Handle CK_NullToMemberPointer in ScalarExprEmitter::EmitCast

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4e382f3130834ac9862047a1f40402f261424774 24-Aug-2009 Anders Carlsson <andersca@mac.com> Pass the cast kind to ScalarExprEmitter::EmitCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
09105f52b1f28cbb1374c27c3c70f5517e2c465d 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
A field rename and more comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
154440e6a8fa6ac5bca395876d79b530b39a2c1c 18-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
60e282cc1e508be327b0481cecedc206873cb86a 16-Aug-2009 Anders Carlsson <andersca@mac.com> Improve handling of delete expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0032b2781b4deb131f8c9b7968f2030bf2489cdd 13-Aug-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bf933a0cb628670490c15367b3f5ccb3193354a7 12-Aug-2009 Dan Gohman <gohman@apple.com> Use the new nsw form of add for signed integer addition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
664f8934e06cf10de98083b4526aef7bce191a3f 12-Aug-2009 Dan Gohman <gohman@apple.com> Use the inbounds variant of getelementptr for common pointer arithmetic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
df1109434abd465a4db2e6f69ec2688866660367 12-Aug-2009 Dan Gohman <gohman@apple.com> Remove the hack that turns sdiv by a power of 2 to ashr, and
use the new "exact" sdiv to allow LLVM optimization to perform
this transformation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2ef13e5abef0570a9f567b4671367275c05d4d34 11-Aug-2009 Nate Begeman <natebegeman@mac.com> Take 2 on AltiVec-style vector initializers.

Fixes PR4704 problems

Addresses Eli's patch feedback re: ugly cast code

Updates all postfix operators to remove ParenListExprs. While this is awful,
no better solution (say, in the parser) is obvious to me. Better solutions
welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1df5109f475bcbc528eb1fb9fdb179dcadbb33a6 10-Aug-2009 Daniel Dunbar <daniel@zuster.org> Revert r78535, it is causing a number of failures to build projects.

--- Reverse-merging r78535 into '.':
D test/Sema/altivec-init.c
U include/clang/Basic/DiagnosticSemaKinds.td
U include/clang/AST/Expr.h
U include/clang/AST/StmtNodes.def
U include/clang/Parse/Parser.h
U include/clang/Parse/Action.h
U tools/clang-cc/clang-cc.cpp
U lib/Frontend/PrintParserCallbacks.cpp
U lib/CodeGen/CGExprScalar.cpp
U lib/Sema/SemaInit.cpp
U lib/Sema/Sema.h
U lib/Sema/SemaExpr.cpp
U lib/Sema/SemaTemplateInstantiateExpr.cpp
U lib/AST/StmtProfile.cpp
U lib/AST/Expr.cpp
U lib/AST/StmtPrinter.cpp
U lib/Parse/ParseExpr.cpp
U lib/Parse/ParseExprCXX.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
237957c45774713f81fbd5394b3db4317fef0938 09-Aug-2009 Anders Carlsson <andersca@mac.com> Improve handling of member pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
25b4fdb9d63095448e6cbc97b8865b36b0c8cbb6 09-Aug-2009 Nate Begeman <natebegeman@mac.com> AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);

In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
112a0a8ddf23f6d25e0920002d5d4c1df0515f86 08-Aug-2009 Anders Carlsson <andersca@mac.com> Add a CK_ArrayToPointerDecay cast kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c9c88b4159791c48e486ca94e3743b5979e2b7a6 31-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3b144ba615c32f3cfa5309060ed5e09c89ac2871 31-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
03e205031b08669f05c41eed5b896fc94c4a12bb 31-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
b3589f44c5d295cd41de2c83f3475116835eeebd 31-Jul-2009 Mike Stump <mrs@apple.com> Canonicalize else spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
96e0fc726c6fe7538522c60743705d5e696b40af 30-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6217b80b7a1379b74cced1c076338262c3c980b3 29-Jul-2009 Ted Kremenek <kremenek@apple.com> Change uses of:
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()

And remove Type::getAsReferenceType(), etc.

This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a91d6a6619a91d0ca7102d8ab5678d855f04d850 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Code refactoring to define getCXXRecordDeclForPointerType
and use it in several places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
fa9f8b4cf962d865c4b430a25aca2fb5faa84337 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen derived-to-base conversion in implicit casts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4a28932dba03132dabbe70abdadcaae468dd7933 28-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bc0a2226c7fcd18b29b6846049e2cfcb872d3593 27-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4a28d5deeba33722aa009eab488591fb9055cc7e 25-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1360d4ad9045056d646c118344c7c5148aea4a52 22-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Make vectorized floating-point comparisons work without crashing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4cd1608ba49c456504a3a25522c54a534b6880f3 21-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
19cc4abea06a9b49e0e16a50d335c064cd723572 18-Jul-2009 Anders Carlsson <andersca@mac.com> Revert r75641.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
35366a67baa970c287c714c957cf78a4131cf60d 17-Jul-2009 Ted Kremenek <kremenek@apple.com> Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
62a11a78c2616ce1fa3ef7b1a4bc3f42365cafb9 17-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for --/++ operators of objc object pointers
in 32bit abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1a1a6e2bd4c5aefd7fd643cf25915f9623a02e59 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.

The motivation behind this change is twofold:

1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.

2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.

Along with this patch:

a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a1cf15f4680e5cf39e72e28c5ea854fcba792e84 15-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change, and contextify a bunch of related stuff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
58f9f2c884af6b72d036b746a016d8031d31cb7a 14-Jul-2009 Steve Naroff <snaroff@apple.com> Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris).

I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3d598a5ab3c8aabce0a03a2f5dea65eee643e5ac 14-Jul-2009 Anders Carlsson <andersca@mac.com> Rename RecordLayout.h to ASTRecordLayout.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
69243825cb5c91ec7207256aa57ae327cfaf8cb2 13-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
14108da7f7fc059772711e4ffee1322a27b152a7 11-Jul-2009 Steve Naroff <snaroff@apple.com> This patch includes a conceptually simple, but very intrusive/pervasive change.

The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.

This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.

By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.

Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9c10fcfc3b9d2076efe701b60644a9987a93c503 08-Jul-2009 Chris Lattner <sabre@nondot.org> reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.
Also, enable them in sema so that they are tested, and now that the x86 backend
has stablized.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
87415d2d45224596a96ef02310701797d56b2c19 17-Jun-2009 Chris Lattner <sabre@nondot.org> Update clang for the add ->add/fadd split. Likewise for sub and mul.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73604 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
fb6fa30a9b06670deb14f862dddbc49a12552939 04-Jun-2009 Anders Carlsson <andersca@mac.com> Use PushConditionalTempDestruction/PopConditionalTempDestruction for the ternary operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
33da07db112f4877f6ab13e20db08b9bb86a0c2e 04-Jun-2009 Anders Carlsson <andersca@mac.com> Use conditional temp destruction for || and &&.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a00703dccbdc6cc4a293db38477dea7db5538c7e 31-May-2009 Anders Carlsson <andersca@mac.com> Add a new function for emitting new functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3082463f4f387b725f4e4bf7d7b46269d445e4f5 31-May-2009 Anders Carlsson <andersca@mac.com> Call EmitCXXExprWithTemporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7f79f9be5916c51c35da4f126b7c12596a101607 29-May-2009 Mike Stump <mrs@apple.com> Fixup the rest of the trivial cases of the codegen of volatile. If
any body can spot codegen bugs with volatile, or knows of any in the
bug database, let me know.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e9f2f45fe9bf79bd4aea47fa1ad9204b68510fd9 27-May-2009 Anders Carlsson <andersca@mac.com> Functions that return references can be rvalues as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
cc0442fa28e5d1f403f820dcdee49911c3e622a9 22-May-2009 Mike Stump <mrs@apple.com> Fixup codegen for __block int i; i += rhs();. Should also slightly
improve codegen in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
99459b67daa0a49af7c5e5e93324f6ca815c0e6a 21-May-2009 Mike Stump <mrs@apple.com> Fixup blocks codegen for { __block i; i = rhs(); }, we want the rhs
evaluated first. This can also improve codegen just a bit as we might
have another register to play with for the evaluation of the rhs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9f84d88a302ea38cf0695ce8cdace47178d2fff4 19-May-2009 Anders Carlsson <andersca@mac.com> Don't always zext the result of the not unary operator to an int.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7f6ad153565245026c7569314f65a4d4ff4ac41f 19-May-2009 Anders Carlsson <andersca@mac.com> Have AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. Stub out VisitCXXExprWithTemporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2a866251a80a8d88f6908f7dc68ce06d1023ec1d 25-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix pointer addressing and array subscripting of Objective-C interface
types.
- I broke this in the switch to representing interfaces with opaque
types.

- <rdar://problem/6822660> clang crashes on subscript of interface in
32-bit mode


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7cabee5b18212bd3106aea8415b044b2b3b43518 24-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Clang part of r69947. Reverting back 69574 as it is no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c62aad8f45ec3dd893376bd1c51e5e8019a76d8e 20-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR3247: Handle a couple of cases where we weren't emitting VLA sizes (and
subsequently crashed).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8f426fa9fca022201fc0944d6c1cb2cf9918db7d 20-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.

Adapted from patch by Tim Northover.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5f4307b7ba164b03c853c8d3eb4674d33f8967a6 14-Apr-2009 Anders Carlsson <andersca@mac.com> Support code generation of 'this' exprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ab4eff620a9ce0ea62cdf29529a66c2c98d116f5 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make sure value is initialized when built w/o asserts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
75c47a5cdf480571a71935cf80d49f802fec15a3 08-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Pointer width on targets like PIC16 is 16-bit, while the valid index size to GEP is only 32 or 64. So promote index to 32 in such cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
035cf8911c2282550411be70f370dfe5d282b5c9 02-Apr-2009 Mike Stump <mrs@apple.com> Remove -ftrapu.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5d8b2cf9fd704f6ca5e33525803a65421c0b440e 02-Apr-2009 Mike Stump <mrs@apple.com> Fixup -ftrapv to be more gcc compatible. -ftrapu (for want of a
better name) is the option that SmallTalk can use to intercept all
overflows, including unsigned. I added some testcases so we don't
break anything.

Also included is another patch from David for += and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
2add47387d39ee6c40dcb0e9f3d51c27ad1e113c 01-Apr-2009 Mike Stump <mrs@apple.com> Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is and two bug fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7e203b7f5d894b1969765332e35c6a8b4d45556f 01-Apr-2009 Douglas Gregor <dgregor@apple.com> Revert r68221, -ftrapv support, which causes several regressions in
Clang's test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3fb07bdc32cb301a8438c297fe7d68542a7537b2 01-Apr-2009 Mike Stump <mrs@apple.com> Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
515ff5a31d75df9f4f099458a31cd7a405cf513d 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Trivial cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
daa24a29f881fb2ae53c4022e593eda1adf4b95b 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Misc small fixes/cleanups/comment changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ab3a852ae713189444dcbf75e70accf1e8c2b7f2 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Change compound assignment operators to keep track of both the promoted
LHS type and the computation result type; this encodes information into
the AST which is otherwise non-obvious. Fix Sema to always come up with the
right answer for both of these types. Fix IRGen and the analyzer to
account for these changes. This fixes PR2601. The approach is inspired
by PR2601 comment 2.

Note that this changes real *= complex in CodeGen from a silent
miscompilation to an explicit error.

I'm not really sure that the analyzer changes are correct, or how to
test them... someone more familiar with the analyzer should check those
changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f52bbeb1ce55aa10b4519024258b8962777fa8d4 23-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Fix a subtle bug in CodeGen for the increment of a bitfield.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8cc9d08eb8b2652ca939d724ab64dec906e418a0 18-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3809, codegen for inc/dec of function pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7c80bd64032e610c0dbd74fc0ef6ea334447f2fd 17-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8339b35ca05dd040a9a0ecfc92e7b49d80c5a96b 07-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Back out the patch in r66302, and re-fix it properly. We assume for
performance that the type of the returned llvm::Value for an expression
matches the converted type of the clang::Expr; mismatches will cause all
sorts of errors and silent miscompilations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0892099dbc640720400a1d9decd2733a09d733e5 07-Mar-2009 Mike Stump <mrs@apple.com> Codegen support for copy helpers for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a6e27790acb6d06be6c1113ea94165c4b7e056cd 07-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a bug where generation of read-barriers caused
crash in ir-gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7976932a1c256d447316ffac58e9821417725e34 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup for choose expressions: add a helper that returns the
chosen sub-expression, rather than just evaluating the condition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
25615424741bcce31fe52c896f76268f0307f00d 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Attempt to fix PR3709: when converting from an integer to a pointer,
first extend the integer to the correct width.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a99038c0757a836c6faeeddaa5dfd249b32f6e9e 28-Feb-2009 Mike Stump <mrs@apple.com> First cut CodeGen support for __block variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
35183aca180a2b9b2c637cd625a40a7e147d6a32 27-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Change the AST generated for offsetof a bit so that it looks like a
normal expression, and change Evaluate and IRGen to evaluate it like a
normal expression. This simplifies the code significantly, and fixes
PR3396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8a2b4b1c5b960710db95e9b296d9a600aee37c00 26-Feb-2009 Mike Stump <mrs@apple.com> CodeGen support for copied BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
eaf2bb89eb2aad3b80673de30febe52df43c10ec 24-Feb-2009 Chris Lattner <sabre@nondot.org> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
20733cd4fd5c9755cdfab583db862223c93732c8 22-Feb-2009 Mike Stump <mrs@apple.com> Cleanp code with some recent suggestions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4e7a1f7682d94811bd41fca8aefccc38f686db23 21-Feb-2009 Mike Stump <mrs@apple.com> Add CodeGen support for the helper for BlockDeclRefExprs. The easier
stuff is mostly done. Move BlockHasCopyDispose up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bd65cac8de63d108a681035782a71d42954b03ab 19-Feb-2009 Mike Stump <mrs@apple.com> More codegen for blocks. The type of block literals should be better.
The size calculation is improved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1e4db7c468c002c58f07e059ff7925384f053e85 18-Feb-2009 Chris Lattner <sabre@nondot.org> rip out __builtin_overload


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
67a6448a8d52ae46d1cba4e474f9f6b3968d2ff9 14-Feb-2009 Mike Stump <mrs@apple.com> Generate the helper function for blocks. Now basic codegen is
starting to work for blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
12d152f61ccef9a2c0372ba39be7cf416c6e1a9e 14-Feb-2009 Chris Lattner <sabre@nondot.org> fix rdar://6586493, a bug in codegen of the GNU
missing-?:-true-value extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e5fee25e71266712522cff554f25c59b3078a429 13-Feb-2009 Mike Stump <mrs@apple.com> Condense all the blocks code into CGBlocks.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
df6b68c9487aed2042c7fc23db10a79f89083a11 12-Feb-2009 Mike Stump <mrs@apple.com> Initial codegen for block literals. This is a work in progress. I've
tried to put FIXMEs on the most important things to fix up. Lots left
to do including more codegen, more documentation and cleaning code and
style cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0785570af3ef5f8c5a0377129e41efe6f3f8d770 11-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use EmitVAListRef instead of EmitLValue directly to handle array decay
case on x86_64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
db3bd4b4eabc325781a6a407c3dcf68a8d6db0f9 11-Feb-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6518463, increment of a bool is always true, due to
subtle and non-obvious promotion rules. We already handle +=
and +1 correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
e5ed15195b71b8fa440e67d49db0168bb58e4e8a 11-Feb-2009 Chris Lattner <sabre@nondot.org> finish off codegen support for sub of pointer to functions,
finishing off rdar://6520707


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
96f214776c0f69069fee4d67557c8c7f416009a8 05-Feb-2009 Anders Carlsson <andersca@mac.com> Follow Eli's advice and store the VLA size with the native size_t type. Fixes PR3491.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6cd586d2668653501ecd73d53e81cbc76db3a18c 30-Jan-2009 Anders Carlsson <andersca@mac.com> Make sure to cast the VLA size of array to the type of size_t. Fixes PR3442.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a9c878086036de36482cc21e35a33cabe9699b0a 29-Jan-2009 Douglas Gregor <dgregor@apple.com> Make CodeGen produce an error if we come across a non-constant initializer list that involves the GNU array-range designator extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3498bdb9e9cb300de74c7b51c92608e2902b2348 29-Jan-2009 Douglas Gregor <dgregor@apple.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4c67834407ca6ab344dcf44fc599ad4938cfa96d 28-Jan-2009 Douglas Gregor <dgregor@apple.com> 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)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
769e411b72465a63454cdd416ff26ff313d43505 24-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR2910: implement CodeGen for non-constant offsetof.

Note that there are still other issues in this area; see PR3396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f2da9dfef96dc11b7b5effb1d02cb427b2d71599 24-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Refactor sizeof handling to use constant folding logic for constant
sizeof expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
91daf4da934e10dcbf22697d59e2791420b1507a 24-Jan-2009 Chris Lattner <sabre@nondot.org> remove a bunch of alignment handling code out of CGExprScalar, since
alignment must always be a constant. Just let the constant folder
do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
b09fae74acfae7af8b3d31b9638a0aa0fdf7c7ac 23-Jan-2009 Daniel Dunbar <daniel@zuster.org> Handle pointer arithmetic on function pointers.
- <rdar://problem/6518844> Clang-generated bitcode crashes LLVM while compiling function pointer addition expression


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4fd0aa5803357d8c72eeac2cae15e12649ea08fe 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Slight cleanup, and fix for va_arg on architectures where va_list is a
struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
6fe7c8aa8c7546743ecd0ac0138c2cf5d8155386 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Vector codegen improvements


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1522bc80df0a10517bc667c733a918f88dea0b89 16-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Changed the API yet again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ab654afb2d49a9a7db2727b69708ac479728f2a1 16-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Used a more suitable api to get to the type of a record
in code gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
db751ebd3330bc9a64ce4d9d8f24e30669d91406 16-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Implemented code gen for sizeof(objc class interface).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
32f6209ea9a5a88ad3f8d7ad5e5b160b403d12da 12-Jan-2009 Nuno Lopes <nunoplopes@sapo.pt> make ScalarExprEmitter::EmitCompare() emit the expression with the correct type instead of always zext it to an int
this fixes codegen of simple exprs in C++ like 'if (x != 0)'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
088a52d8a94666f0264b656e05921b9c5b091f28 09-Jan-2009 Daniel Dunbar <daniel@zuster.org> Emit more refined "unsupported" error for block expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
3f70456b8adb0405ef2a47d51f9fc2d5937ae8ae 21-Dec-2008 Anders Carlsson <andersca@mac.com> Add codegen support for __null

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
4a1424fd702299fbc354899b8c65bdf8491d8fe9 21-Dec-2008 Anders Carlsson <andersca@mac.com> Implement alignof for vla types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
b50525ba0e996bc072cdb76152fcfe0bc64bb72a 21-Dec-2008 Anders Carlsson <andersca@mac.com> Make sure to emit the size expression for sizeof(type)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8f39f5e96ce4a5f401f431f61db7df1cf05dce6f 21-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Make VLAs usable, and make basic usage work correctly. Also, add a
simple test that actually does VLA codegen.

Note that despite the fact that the alloca isn't in the entry block, it
should dominate all uses; this is guaranteed by the restrictions on goto
into VLA scope in C99.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
71e38c48609b3502d24a47d39a21f1e73402a0e1 13-Dec-2008 Chris Lattner <sabre@nondot.org> disable Anders' recent VLA patch, this fixes PR3209.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5d46315ca3cbbfe0d0f5f65520b618fb05dd4446 12-Dec-2008 Anders Carlsson <andersca@mac.com> Implement allocation and sizeof VLAs. This is very basic for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8de8d1d3f2e21e4a72ac294276930ad293a3a765 02-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR3150: obvious copy-paste bug in
ScalarExprEmitter::VisitBinLOr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
43f447098d5e6162fbfb97ed38365284207a7fbe 22-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Implemented ir-gen for 'implicit' properties using the new AST nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
371d16f45aeec61c1d07687f763d92137e133642 19-Nov-2008 Daniel Dunbar <daniel@zuster.org> Add spec ref to comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ed3849b456d64d124bddc7ac044f3ce590bd9d69 19-Nov-2008 Daniel Dunbar <daniel@zuster.org> Fix redundant load of bit-fields on assignment (to get the updated
value).
- Use extra argument to EmitStoreThroughLValue to provide place to
write update bit-field value if caller requires it.
- This fixes several FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
531a550531c144a58438f187816abbf1879e1c4e 16-Nov-2008 Chris Lattner <sabre@nondot.org> daniel prefers completed thoughts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9615ecb44f549ae9fa2b4db6ff46bc78befbf62c 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> Normalize many BasicBlock names.
- Use dotted notation for blocks related to a particular statement
type.
- Use .end for landing pads.

No functionality change in NDEBUG mode. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
be65abc8e41213ecb951f2f507fb2e13a151d30c 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Rename ?: operator blocks to cond.true and cond.false (I don't know
what "cond.?" means, and this avoids quoting).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9802a5173ffd403d9ede2d4b6b6107fa2e220544 12-Nov-2008 Chris Lattner <sabre@nondot.org> Lower ?: into select when the selected values are cheap and side-effect-free.
This cuts another 200 lines off expr.ll, forming 23 selects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f7b5ea9de3d043fa900ab8a8976a4c0eefc233b7 12-Nov-2008 Chris Lattner <sabre@nondot.org> emit better codegen for ||/&&, shrinking expr.ll by another 240 lines.
This happens for stuff like this:

x = cond1 || cond2 || cond3 || cond4;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
20eb09d562b80420a3328be789547af354bf3e36 12-Nov-2008 Chris Lattner <sabre@nondot.org> use ConstantFoldsToSimpleInteger instead of code emission to do
constant folding.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
035cf4294319271ad19ddcc5ba327c8365f3575e 12-Nov-2008 Chris Lattner <sabre@nondot.org> Use EmitBranchOnBoolExpr in VisitConditionalOperator. This
shrinks code yet again by a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
31a0984b5cb4af99d2407c0f25bf5af68df681c6 12-Nov-2008 Chris Lattner <sabre@nondot.org> Move EmitBranchOnBoolExpr and ConstantFoldsToSimpleInteger to
CodeGenFunction.cpp. Change VisitConditionalOperator to use
constant fold instead of codegen'ing a constant conditional.

Change ForStmt to use EmitBranchOnBoolExpr, this shrinks
expr.c very slightly to 40239 lines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
746e03ed511664a1c781b209faaa3a66d4593480 12-Nov-2008 Chris Lattner <sabre@nondot.org> Clean up some code to use isZero instead of calling getZExtValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1fef965b8ec106c36a2e53907ef84458fcd0a4ec 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Use createBasicBlock here too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a448fb2da03ece39978784793eea68760e8205a1 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Rework IRgen invariant w.r.t. current insert point.
- EmitStmt is no longer required to finish with a current insertion
point defined (i.e. it does not need to make dummy
blocks). Instead, it can clear the insertion point in the builder
which indicates that the current insertion point is unreachable.
- CodeGenFunction provides HaveInsertPoint and EnsureInsertPoint
which respectively test if there is an insert point and ensure an
insertion point exists (by making a dummy block).
- Clearly mark functions in CodeGenFunction which can be called with
no insertion point defined. Currently this is a limited set, and
EmitStmt simply EnsureInsertPoint()s before emitting subsequent IR.

Remove EmitDummyBlock, which is no longer needed. Clients who haven't
already cleared the insertion point (typically via EmitBranch) can do
so by hand.

Remove isDummyBlock, which has effectively been renamed to
HaveInsertPoint.

The main thrust of this change is that we no longer have create dummy
blocks just to destroy them a short time later in EmitBlock in the
common case that there is no unreachable code following something like
a goto.

Additionally, this means that we are not using the hokey condition in
isDummyBlock that a block without a name is a dummy block. Guess how
well that works when we never emit block names!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c657e92d7b44568fe39ae018a69b18cbcc4ea3b0 11-Nov-2008 Chris Lattner <sabre@nondot.org> Try to not emit the dead side of ?: if the condition is a constant.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0518999d3adcc289997bd974dce90cc97f5c1c44 11-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d57a871339c7c98d58d93108b806f59bdf4e13e2 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGenFunction::EmitBranch.
- Emits an unconditional branch, with extra logic to avoid generating
spurious branches out of dummy blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0946ccd1e58c1f1da31ddbca67c5b6301ac8b255 11-Nov-2008 Chris Lattner <sabre@nondot.org> short circuit && and || when possible. This substantially reduces
the size of the -O0 output on some cases. For example, on expr.c from
176.gcc, it shrinks the .ll file from 43164 to 42835 lines, and removed
references to two external symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
55e874299f2ad827646a4ca9ea38c402aaeb38c9 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Centralize basic block creation in CodeGenFunction::createBasicBlock.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ddf7cac45d85b73127adbbd91a2b28fc7291c57e 04-Nov-2008 Anders Carlsson <andersca@mac.com> Implement lowering of va_arg in clang directly. (This is 32-bit X86 only for now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
45d196b8387dcefc4df26cda114fa34c6528e928 01-Nov-2008 Daniel Dunbar <daniel@zuster.org> Move IRBuilder type definition to common file.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
be20bb558cae5352898e6a913e29d24d20134841 27-Oct-2008 Chris Lattner <sabre@nondot.org> make codegen reject initializes with designators, like this:

t.c:1:13: error: cannot codegen this designators yet
int a[10] = {2, 4, [8]=9, 10};
^~~~~~~~~~~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0d504c1da852e58ff802545c823ecff3b6c654b8 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ee5a700af3fe9ae1a639c271f093f40677dddc04 10-Oct-2008 Dale Johannesen <dalej@apple.com> Adjust calls to APFloat conversion for new interface.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
90df4b6661968a84bf64baee489bb2f6d948fcc1 04-Sep-2008 Daniel Dunbar <daniel@zuster.org> Avoid superfluous errors regarding variable-length arrays (casts).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
662174c82ef46b19a2329c7d37208e1d12dfb7b3 29-Aug-2008 Daniel Dunbar <daniel@zuster.org> Downgrade a number of FIXME asserts to ErrorUnsupported.
- Notably VLAs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
85c59edda02df48fae8dc85049743319bc6e7e89 29-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add special "property reference" CodeGen::LValue type for emitting
Objective-C property references.
- This handles property references "more correctly" but setters still
don't work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9c3fc703b29a31d40bcf5027dbb4784dd393804e 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> Initial support for Obj-C dot-syntax for getters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d1d66bcd6914ff82abdfa88dd25bb0b74cde3b99 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change another is-a-pointer check to check in terms of LLVM type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
270cc66683b22d6bb0b4644f5a40f84d45edf119 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Do is-a-pointer checks in terms of LLVM types in
EmitScalarConversion().
- Important for allowing Obj-C void * to id<X> casts and so on.
- Not sure about this fix however, perhaps Type should understand
that id is effectively a pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7267f7832e5f0c7f951765e201c5a2650eb1637b 23-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add CodeGen support for CXXZeroInitValueExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0a04d77bde7e3a661c2b41b60630d125d09ed6ef 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Implement Obj-C ivar references to aggregates.

Implement Obj-C lvalue message sends (aggregate returns).

Update several places to emit more precise ErrorUnsupported warnings
for currently unimplemented Obj-C features (main missing chunks are
property references, Obj-C exception handling, and the for ... in
syntax).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8f2926b73ed635afecd020da787af6a837601a2b 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Trim CGObjCRuntime::GenerateMessageSend[Super]
- Returns an RValue.
- Reduced to only taking the CodeGenFunction, Expr, and Receiver.
- Becomes responsible for emitting the arguments.

Add CodeGenFunction::EmitCallExprExt
- Takes optional extra arguments to insert at the head of the call.
- This allows the Obj-C runtimes to call into this and isolates the
argument and call instruction generation code to one place. Upshot
is that we now pass structures (more) correctly.

Also, fix one aspect of generating methods which take structure
arguments (for NeXT). This probably needs to be merged with the
SetFunctionAttributes code in CodeGenModule.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ed7c618f849e2541b1d0288c43154937652c5b15 20-Aug-2008 Daniel Dunbar <daniel@zuster.org> Move all Obj-C runtime interaction into CodeGenFunction.
- Drop duplicate (and broken) code for sending messages.
- Add EmitObjCProtocolExpr to CodeGenFunction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
54d19091a809d30a5e6e352fda53377d69ebda66 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGen support for AddrLabelExpr in initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
488e993a135ce700b982bf099c3d6b856301d642 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
af2f62ce32e462f256855cd24b06dec4755d2827 13-Aug-2008 Daniel Dunbar <daniel@zuster.org> 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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
22711185f2368bea6325504b58cac021857eb0d7 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Drop Sender from GenerateMessageSend*
- Was unused and generated a unnecessary load of self
(missed file)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
98c5ead87d720d8b68b6f236c3c3579a388fc882 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Protocol related tweaks
- Implement type conversion of ObjCQualifiedIdType
- Wire @protocol(...) to GenerateProtocolRef in ScalarExprEmitter


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
a008db15ee50455ff98db1e4251cdda5c89a90ee 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add @selector(...) codegen support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
208ff5e8a073de2a5d15cbe03cab8a4c0d935e28 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change CodeGenModule to only create ObjC runtime for ObjC files
- Changed CodeGenModule::getObjCRuntime to return reference.
- Added CodeGenModule::hasObjCRuntime predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
de7fb8413b13651fd85b7125d08b3c9ac2816d9d 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Remove internal uses of AST.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d9f6910f4ef37c0e8eeee2a01287d9572c3176ef 10-Aug-2008 Chris Lattner <sabre@nondot.org> rename PreDefinedExpr -> PredefinedExpr



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
85e356825b291f86c6e926638914222b834b71a3 08-Aug-2008 Chris Lattner <sabre@nondot.org> update to make IRBuilder API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8c6f57c38b1451bb28945876b0d147fd2f26e6d3 06-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix CodeGen of pointer arithmetic in compound assignment statements.

- Changed EmitSub to work on all cases (arithmetic, ptr - int, ptr -
ptr) so that implementation matches that of other operators.

- Modify EmitCompoundAssign to compute and perform the appropriate
casts of left, right, and result types for the assorted pointer
arithmetic cases.

- Fix EmitSub (ptr - int) case to negate the rhs *after*
extension. This is critical when the rhs is unsigned (and needs
extension).

- This fixes cfrac.

- <rdr://6115726>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
820b03398fdcc8f1f6c60ace55b708e311fa8ce4 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, CodeGen of (void*) - (void*) was broken.
- <rdar://problem/6122967>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
0ffb125996336fc7602b162c0a9e392f1a93060f 04-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGen support for indirect goto.
- Follows emission scheme used by llvm-gcc, i.e. invent an id for
each label whose address is taken and replace each indirect goto by
a switch to each possible target.
- Currently we emit a switch for each indirect goto instead of
merging them as llvm-gcc does.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9619662a1d42e2008b865d3459c0677e149dad1b 27-Jul-2008 Chris Lattner <sabre@nondot.org> remove uses of QualType::getCanonicalType() from codegen for PR2189


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
91d723da7b68be5245c3ac58aa2a36d04658cfb8 26-Jul-2008 Chris Lattner <sabre@nondot.org> implement codegen support for labels at the end of stmtexprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
345f7209692b116ca433a3196c1e3c998e0ffcde 26-Jul-2008 Chris Lattner <sabre@nondot.org> minor tidying, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
7a66d7b6c0d84f8c9c74c687a338cf3cf6b9c808 25-Jul-2008 Nate Begeman <natebegeman@mac.com> Generate vector compares in codegen


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
f31627f676374812d0355d7e34fd2e940b400757 23-Jul-2008 Chris Lattner <sabre@nondot.org> Fix a codegen crash on:

int foo(void) {
float x[2];
return x;
}

rdar://6093986


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
8ee6a63ba1cc2455f4b3e9111091908d50796818 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add note to check what __alignof__ a function type should be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9140845f95d7dedd410d93c3390dd00104c76b0a 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Prevent codegen crash on sizeof(<function type>), a gcc extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
b7cfe88e88cb4f46308de89cf3f0c81bfe624128 30-Jun-2008 Chris Lattner <sabre@nondot.org> Make a few related changes:

1) add a new ASTContext::getFloatTypeSemantics method.
2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places.
3) Change the TargetInfo.h get*Format methods to return their
fltSemantics byref instead of by pointer.
4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which
sometimes expand specially and othertimes fall back to libm.
5) Add support for __builtin_nan("") to codegen, cases that don't pass
in an empty string are currently lowered to libm calls.
6) Fix codegen of __builtin_infl.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9384c768e93f270118a30ce96546083a666da284 26-Jun-2008 Chris Lattner <sabre@nondot.org> avoid a lot of unneeded selector processing work by passing around
selectors instead of Value*'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
5549976193e34417d4474a5f4a514268ef6666c7 17-Jun-2008 Ted Kremenek <kremenek@apple.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
108f55d6fd9a1c0e753eb8e046cb1f1b81d77a76 04-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> fix crash when codegening 'cond ? lhs : call-to-void-func()'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
20ff3108fcd2c3bd734dc79efc22ebaa090abd41 01-Jun-2008 Anton Korobeynikov <asl@math.spbu.ru> Support for code generation of Objective-C top-level language constructs.
Implemented by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ec2c12646aee07bf6bb1b4092d538d5860fd0661 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix an extremely subtle bug with pointer comparisons: they have to be
unsigned because it's possible (at least in theory) to have
have both positive and negative pointers pointing to the same object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
1849128c7d88247d914f05efe4c03907f0932174 25-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR2001. I'm not really fond of it, but it is correct (unless
someone tries to make a bitfield volatile?).

Not sure how to write a test; any suggestions?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
856226c37ff10955c7f3f07ce6fa9522da23a3a5 16-May-2008 Eli Friedman <eli.friedman@gmail.com> Backout of codegen-based fix to PR2334; this has been fixed differently
at the Sema layer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
145c08360a8ef90392bb0482c94f47e632e78f8c 16-May-2008 Eli Friedman <eli.friedman@gmail.com> Patch for PR2334, and a similar ObjC bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
d38617c8a50f9729c254ab76cd359af797c6739b 14-May-2008 Eli Friedman <eli.friedman@gmail.com> Implementation of __builtin_shufflevector, a portable builtin capable of
expressing the full flexibility of the LLVM shufflevector instruction.
The expected immediate usage is in *mmintrin.h, so that they don't
depend on the mess of gcc-inherited (and not completely implemented)
shuffle builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
06e863f2902b8ba55b056308875c19f7ba3dab25 14-May-2008 Eli Friedman <eli.friedman@gmail.com> Add codegen support for block-level compound literals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
25ddea7f7835c4b1804e458a5c866cde0097430a 20-Apr-2008 Chris Lattner <sabre@nondot.org> implement a fixme, add support for ++/-- on long double.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
59138ba7ce960888433546639deb45e2e03f8857 20-Apr-2008 Chris Lattner <sabre@nondot.org> use simplified ConstantFP:get method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
213541a68a3e137d11d2cefb612c6cdb410d7e8e 19-Apr-2008 Nate Begeman <natebegeman@mac.com> OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
50b36741673258aaebcd3c7fe1260031901cae57 13-Apr-2008 Chris Lattner <sabre@nondot.org> update to follow mainline llvm API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
04421087832a031c90bd58f128c7c0e741db8dd2 08-Apr-2008 Chris Lattner <sabre@nondot.org> Add support for C++ default arguments, and rework Parse-Sema
interaction for function parameters, fixing PR2046.

Patch by Doug Gregor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
984d0b414bc76d3530b9bc55a5a55834ba76c607 06-Apr-2008 Gabor Greif <ggreif@gmail.com> tracking API changes arising from r49277

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
9b2dc287177394a8f73833e2ad4f7ca8cd6f22bb 04-Apr-2008 Chris Lattner <sabre@nondot.org> Since isComplexType() no longer returns true for _Complex integers, the code
generator needs to call isAnyComplexType(). This fixes PR1960.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
c8aa5f1f264fb230c38182adab944232bb160c2b 04-Apr-2008 Chris Lattner <sabre@nondot.org> Codegen assignment to self correctly, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bdcd637c29ec1540f912ea6860c88b910e78c329 02-Apr-2008 Chris Lattner <sabre@nondot.org> add a common base class "PointerLikeType" for PointerType and ReferenceType,
allowing them to be treated the same in some contexts. A suggestion for a
better name is welcome :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
ce5605ecf76d8cde6372138f830bb144d174ced9 31-Mar-2008 Chris Lattner <sabre@nondot.org> some cleanups on top of David's patch. There are still two
remaining open issues I've communicated to him:

1) self can be assigned to, and his patch didn't handle it correctly.
2) CollectObjCIvarTypes is N^2 (because each subclass reprocesses
all parent class ivars) and flattens classes. If A derives from B,
and both have an int, I'd expect to get { {i32}, i32}, not { i32, i32}.

David, please review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
391d77a26382dddf25da73e29fc1fa5aaaea4c6f 31-Mar-2008 Chris Lattner <sabre@nondot.org> Add initial support for objc codegen for methods, ivars, and the
etoile runtime, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
36b6a0a63e87803a85080c639ad8b61e8bb5f9ee 19-Mar-2008 Chris Lattner <sabre@nondot.org> simplify the clang codegen by using the new Builder.CreateStructGEP method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp
bda0b626e74513950405c27525af87e214e605e2 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprScalar.cpp