History log of /external/clang/lib/CodeGen/CGDecl.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/CGDecl.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/CGDecl.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/CGDecl.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/CGDecl.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/CGDecl.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/CGDecl.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/CGDecl.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/CGDecl.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/CodeGen/CGDecl.cpp
8b54999a831bb195c08541ca995ef0505c96193f 30-Oct-2013 Mark Lacey <mark.lacey@apple.com> Add CodeGenABITypes.h for use in LLDB.

CodeGenABITypes is a wrapper built on top of CodeGenModule that exposes
some of the functionality of CodeGenTypes (held by CodeGenModule),
specifically methods that determine the LLVM types appropriate for
function argument and return values.

I addition to CodeGenABITypes.h, CGFunctionInfo.h is introduced, and the
definitions of ABIArgInfo, RequiredArgs, and CGFunctionInfo are moved
into this new header from the private headers ABIInfo.h and CGCall.h.

Exposing this functionality is one part of making it possible for LLDB
to determine the actual ABI locations of function arguments and return
values, making it possible for it to determine this for any supported
target without hard-coding ABI knowledge in the LLDB code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
ef4579cda09b73e3d4d98af48201da25adc29326 06-Aug-2013 Larisse Voufo <lvoufo@google.com> Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
7a36a5913f045bfaf6d26ed874e39a3e7c1ad9ae 01-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Simplify linkage code for static local vars.

The key insight here is that weak linkage for a static local variable
should always mean linkonce_odr, because every file that needs it will
generate a definition. We don't actually care about the precise linkage
of the parent context. I feel a bit silly that I didn't realize this before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
07369dde9d72213bf8a48288cd8b29999af9a40c 01-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Fix mangling for block literals.

Blocks, like lambdas, can be written in contexts which are required to be
treated as the same under ODR. Unlike lambdas, it isn't possible to actually
take the address of a block, so the mangling of the block itself doesn't
matter. However, objects like static variables inside a block do need to
be mangled in a consistent way.

There are basically three components here. One, block literals need a
consistent numbering. Two, objects/types inside a block literal need
to be mangled using it. Three, objects/types inside a block literal need
to have their linkage computed correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9b60195ad4843c9e2e231673a0dbc0d5c8c6eb2b 21-Jun-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Destroy temporary record arguments in the callee

Itanium destroys them in the caller at the end of the full expression,
but MSVC destroys them in the callee. This is further complicated by
the need to emit EH-only destructor cleanups in the caller.

This should help clang compile MSVC's debug iterators more correctly.
There is still an outstanding issue in PR5064 of a memcpy emitted by the
LLVM backend, which is not correct for C++ records.

Fixes PR16226.

Reviewers: rjmccall

Differential Revision: http://llvm-reviews.chandlerc.com/D929

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
93cc515d3b99dca18d287d200e19355a2e9c02b2 17-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Compute the visibility of static local variables consistently. Fixes PR16208.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9610d77508bdca13e0475783ff404428611c9683 17-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Cleanup linkage computation for static locals.

With this patch we assign VisibleNoLinkage to static locals in inline functions.
This lets us simplify CodeGen a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
678eca456bc62900dc7407bdbc9fa282da9d2f8f 13-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Fix the linkage of static locals inside a CapturedStmt. (Found in the
process of trying to fix the related issue for block literals.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
d4ec562b3aaf50ea9015f82c96ebfd05a35fc7ef 13-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Simplify: we don't need any special-case lifetime extension when initializing
declarations of reference type; they're handled by the general case handling of
MaterializeTemporaryExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
7c3e615f01e8f9f587315800fdaf2305ed824568 13-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR12086, PR15117

Introduce CXXStdInitializerListExpr node, representing the implicit
construction of a std::initializer_list<T> object from its underlying array.
The AST representation of such an expression goes from an InitListExpr with a
flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr
containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr).

This more detailed representation has several advantages, the most important of
which is that the new MaterializeTemporaryExpr allows us to directly model
lifetime extension of the underlying temporary array. Using that, this patch
*drastically* simplifies the IR generation of this construct, provides IR
generation support for nested global initializer_list objects, fixes several
bugs where the destructors for the underlying array would accidentally not get
invoked, and provides constant expression evaluation support for
std::initializer_list objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8a07cd3f59a0ede54906bdc8ed21724815db27ad 12-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Reapply r183721, reverted in r183776, with a fix for a bug in the former (we
were lacking ExprWithCleanups nodes in some cases where the new approach to
lifetime extension needed them).

Original commit message:

Rework IR emission for lifetime-extended temporaries. Instead of trying to walk
into the expression and dig out a single lifetime-extended entity and manually
pull its cleanup outside the expression, instead keep a list of the cleanups
which we'll need to emit when we get to the end of the full-expression. Also
emit those cleanups early, as EH-only cleanups, to cover the case that the
full-expression does not terminate normally. This allows IR generation to
properly model temporary lifetime when multiple temporaries are extended by the
same declaration.

We have a pre-existing bug where an exception thrown from a temporary's
destructor does not clean up lifetime-extended temporaries created in the same
expression and extended to automatic storage duration; that is not fixed by
this patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a57be5617a0735a654d4c8145be1fd752f776772 11-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Revert r183721. It caused cleanups to be delayed too long in some cases.
Testcase to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
85af7cecadbf5d4b905d6b3b4b1b6fa684183aff 11-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Rework IR emission for lifetime-extended temporaries. Instead of trying to walk
into the expression and dig out a single lifetime-extended entity and manually
pull its cleanup outside the expression, instead keep a list of the cleanups
which we'll need to emit when we get to the end of the full-expression. Also
emit those cleanups early, as EH-only cleanups, to cover the case that the
full-expression does not terminate normally. This allows IR generation to
properly model temporary lifetime when multiple temporaries are extended by the
same declaration.

We have a pre-existing bug where an exception thrown from a temporary's
destructor does not clean up lifetime-extended temporaries created in the same
expression and extended to automatic storage duration; that is not fixed by
this patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e67ca5803ac9e39cc31ed1ad9576e1626c8141eb 02-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR12848: When emitting a local variable declared 'constexpr', always initialize it with a store or a memcpy, not by emitting the initializer expression. This is not required for correctness, but more closely aligns with people's expectations, and is cheap (since we've already evaluated the initializer).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
fc46ebc2b1345723a894ae352cfb206c1d930295 21-May-2013 David Blaikie <dblaikie@gmail.com> PR14606: Debug Info for namespace aliases/DW_TAG_imported_module

This resolves the last of the PR14606 failures in the GDB 7.5 test
suite. (but there are still unresolved issues in the imported_decl case
- we need to implement optional/lazy decls for functions & variables
like we already do for types)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9faebd23fd69ac1591520e811dfa5b25f73012f3 20-May-2013 David Blaikie <dblaikie@gmail.com> Revert "Revert "Debug Info: Using declarations/DW_TAG_imported_declaration of variables, types, and functions.""

This reverts commit r181947 (git d2990ce56a16050cac0d7937ec9919ff54c6df62 )

This addresses one of the two issues identified in r181947, ensuring
that types imported via using declarations only result in a declaration
being emitted for the type, not a definition. The second issue (emitting
using declarations that are unused) is hopefully an acceptable increase
as the real fix for this would be a bit difficult (probably at best we
could record which using directives were involved in lookups - but may
not have been the result of the lookup).

This also ensures that DW_TAG_imported_declarations (& directives) are
not emitted in line-tables-only mode as well as ensuring that typedefs
only require/emit declarations (rather than definitions) for referenced
types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
713e3f25636736fe798c8603ebca56ae8d5372e8 16-May-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Let CodeGenFunction::EmitVarDecl query the semantic storage class info.
Added testcase corresponding to PR15991.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
214c3d6c64674427e3eaa8e8fefac8c684302010 16-May-2013 David Blaikie <dblaikie@gmail.com> Revert "Debug Info: Using declarations/DW_TAG_imported_declaration of variables, types, and functions."

This reverts commit r181393 (git 3923d6a87fe7b2c91cc4a7dbd90c4ec7e2316bcd).

This seems to be emitting too much extra debug info for two (known)
reasons:
* full class definitions are emitted when only declarations are expected
* unused using declarations still produce DW_TAG_imported_declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3923d6a87fe7b2c91cc4a7dbd90c4ec7e2316bcd 08-May-2013 David Blaikie <dblaikie@gmail.com> Debug Info: Using declarations/DW_TAG_imported_declaration of variables, types, and functions.

Basic support is implemented here - it still doesn't account for
declared-but-not-defined variables or functions. It cannot handle out of
order (declared, 'using', then defined) cases for variables, but can
handle that for functions (& can handle declared, 'using'd, and not
defined at all cases for types).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
957dac5b6d826bc0c10011c8b5c3f1b8007fda41 22-Apr-2013 David Blaikie <dblaikie@gmail.com> Revert "Revert "PR14606: Debug info for using directives/DW_TAG_imported_module""

This reverts commit 179839 now that the corresponding LLVM patch has been fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
c3e81e78e8b1d5ba3df2d5801841b4fbc53c1bd8 19-Apr-2013 Eric Christopher <echristo@gmail.com> Revert "PR14606: Debug info for using directives/DW_TAG_imported_module"

This reverts commit r179837 as it seems to be causing test failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
cec39845823bb051de7ae86bb9528c57547ec4cf 19-Apr-2013 David Blaikie <dblaikie@gmail.com> PR14606: Debug info for using directives/DW_TAG_imported_module

More changes later for using declarations/DW_TAG_imported_declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
6afcf8875d4e447645cd7bf3733dd8e2eb8455dc 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Sema for Captured Statements

Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic
analysis. Currently captures all variables by reference.

TODO: templates

Author: Ben Langmuir <ben.langmuir@intel.com>

Differential Revision: http://llvm-reviews.chandlerc.com/D433


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
76da55d3a49e1805f51b1ced7c5da5bcd7f759d8 16-Apr-2013 John McCall <rjmccall@apple.com> Basic support for Microsoft property declarations and
references thereto.

Patch by Tong Shen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
38afbc7361d861968232defaeaf8e302af75b5ee 13-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Annotate flavor of TLS variable (statically or dynamically initialized) onto the AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
d2615cc53b916e8aae45783ca7113b93de515ce3 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add 178663 back.

http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green
before it processed the reverted 178663, so it could not have been the culprit.

Revert "Revert 178663."

This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert 178663.

Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb

Revert "Don't compute a patched/semantic storage class."

This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8f187f62cb0487d31bc4afdfcd47e11fe9a51d05 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't compute a patched/semantic storage class.

For variables and functions clang used to store two storage classes. The one
"as written" in the code and a patched one, which, for example, propagates
static to the following decls.

This apparently is from the days clang lacked linkage computation. It is now
redundant and this patch removes it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4f01ed4205a7189520f6a481fe2113856833421f 02-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] Emit lifetime markers for local variables in -fsanitize=use-after-scope mode

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9b97adfb770c3b55c1a45049d53b624bbc6f62e1 29-Mar-2013 Adrian Prantl <aprantl@apple.com> Bugfix/Followup for r177086.
* Store the .block_descriptor (instead of self) in the alloca so we
can guarantee that all captured variables are available at -O0.
* Add the missing OpDeref for the alloca.
rdar://problem/12767564

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
6c82fc65e45c668a36b06536e66563fe937a3096 26-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove useGlobalsForAutomaticVariables.

It is unused since pic support went away.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
495cfa46300979642acde8d93a1f21c9291dac98 23-Mar-2013 Nadav Rotem <nrotem@apple.com> Make clang to mark static stack allocations with lifetime markers to enable a more aggressive stack coloring.
Patch by John McCall with help by Shuxin Yang.
rdar://13115369



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
c640058aa7f224a71ce3b1d2601d84e1b57f82d3 22-Mar-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP threadprivate directive parsing and semantic analysis

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
836e7c9357b312fd1ee5c90898ce2c81bb384997 14-Mar-2013 Adrian Prantl <aprantl@apple.com> Allocate stack storage for .block_descriptor and captured self at -O0.
This way the register allocator will not optimize away the debug info
for captured variables.

Fixes rdar://problem/12767564

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
5b07e8077a20b80fee90bd76c43c6150c676e4a8 13-Mar-2013 John McCall <rjmccall@apple.com> Tighten up the rules for precise lifetime and document
the requirements on the ARC optimizer.

rdar://13407451

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9eda3abe7e183b05834947391c0cdc291f4ee0d8 07-Mar-2013 John McCall <rjmccall@apple.com> Promote atomic type sizes up to a power of two, capped by
MaxAtomicPromoteWidth. Fix a ton of terrible bugs with
_Atomic types and (non-intrinsic-mediated) loads and stores
thereto.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
684aa73192d92850a926870be62a1787eb5b7ed9 22-Feb-2013 Michael Han <fragmentshaders@gmail.com> [Sema] Semantic analysis for empty-declaration and attribute-declaration.

Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain
to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these
attributes can be sema checked just as attributes attached to "normal" declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
41a6a3e064192e98a48f5fabccf262412fe37d10 21-Feb-2013 Fariborz Jahanian <fjahanian@apple.com> objective-C arc IR-gen. Retaining of strong
arguments in function prologue is done
with objc_StoreStrong to pair it with
similar objc_StoreStrong for release in function
epilogue. This is done with -O0 only.
// rdar://13145317


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
c8c24277a8cce39db95b0e05b79cbdf7e7558355 02-Feb-2013 David Blaikie <dblaikie@gmail.com> Revert r174246, accidentally committed.

This reverts commit 1513eb9284c23acfd19cf742b95996fbb11ca741.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
1513eb9284c23acfd19cf742b95996fbb11ca741 02-Feb-2013 David Blaikie <dblaikie@gmail.com> Basics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
074cae0861a87bf96d8ea56d02e34839d9ccbd0a 01-Feb-2013 John McCall <rjmccall@apple.com> Destroy arrays and ARC fields when throwing out of ctors.

Previously we were only handling non-array fields of class type.

Testcases derived from a patch by WenHan Gu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
378e1e739aed97e9b278beeb20e9f5bbe34c0232 31-Jan-2013 Douglas Gregor <dgregor@apple.com> When we're emitting a constructor or destructor call from a delegating
constructor, retrieve our VTT parameter directly. Fixes PR14588 /
<rdar://problem/12867962>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
0a6b708add17894e355201d1e4fb9110beb608e5 24-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> CGDecl.cpp: Prune three descriptions in two methods, CodeGenFunction::pushIrregularPartialArrayCleanup() and CodeGenFunction::pushRegularPartialArrayCleanup(). [-Wdocumentation]

/// \param array - a value of type elementType*
/// \param destructionKind - the kind of destruction required
/// \param initializedElementCount - a value of type size_t* holding the number of successfully-constructed elements

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
0db661e67f613f49d047cdf53da29b9741234ad8 21-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Don't eagerly emit a global static merged with a local extern.

When we are visiting the extern declaration of 'i' in

static int i = 99;
int foo() {
extern int i;
return i;
}

We should not try to handle it as if it was an function static. That is, we
must consider the written storage class.

Fixing this then exposes that the assert in EmitGlobalVarDeclLValue and the
if leading to its call are not completely accurate. They were passing before
because the second decl was marked as having external storage. I changed them
to check the linkage, which I find easier to understand.

Last but not least, there is something strange going on with cuda and opencl.
My guess is that the linkage computation for these languages needs to be
audited, but I didn't want to change that in this patch so I just updated
the storage classes to keep the current behavior.

Thanks to Reed Kotler for reporting this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.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/CGDecl.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/CGDecl.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/CGDecl.cpp
f3477c13eeaf11b32a41f181398fb5deffd0dd73 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
94ff8e1f57c6382d91d0de981a4f311509d83e37 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Fix a typo 'iff' => 'if'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
1aba7783ad8fe326f10f5aa494721db23bdd593e 28-Aug-2012 Peter Collingbourne <peter@pcc.me.uk> CUDA: give correct address space to globals declared in functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
06d43684289bfcf3b2dbaf081aa861f76933d891 28-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Hoist check from recursive function to its only callsite.

Suggested by Roman Divacky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
cfa07e3519cff1c69cd39d02c80263fd6469c3db 27-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: When emitting stores for an initializer, only emit a GEP if we really need the store.

This avoids emitting many dead GEPs for large zero-initialized arrays.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
de981f3ff163bc9ec69e4c5e7316e94276412993 28-Jun-2012 Hans Wennborg <hans@hanshq.net> Add -ftls-model command-line flag.

This allows for setting the default TLS model. (PR9788)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
5e2d5dec7736f6f9292d4212dec67295909f1328 23-Jun-2012 Hans Wennborg <hans@hanshq.net> Support the tls_model attribute (PR9788)

This adds support for the tls_model attribute. This allows the user to
choose a TLS model that is better than what LLVM would select by
default. For example, a variable might be declared as:

__thread int x __attribute__((tls_model("initial-exec")));

if it will not be used in a shared library that is dlopen'ed.

This depends on LLVM r159077.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
ddfc8a1e68ac67d748ca918acac8f1c78a51395c 19-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> objc-arc: captured block variable accessed in its block literal
initializer need be null initialized before initializer takes
hold, just like any other initialized retainable object pointer.
// rdar://11016025


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
fd00eecad6fa5400cf37269d84361a0551d0e6d3 04-May-2012 Alexey Samsonov <samsonov@google.com> This patch adds a new Clang compiler flag "-gline-tables-only".
It reduces the amount of emitted debug information:
1) DIEs in .debug_info have types DW_TAG_compile_unit, DW_TAG_subprogram,
DW_TAG_inlined_subroutine (for opt builds) and DW_TAG_lexical_block only.
2) .debug_str contains only function names.
3) No debug data for types/namespaces/variables is emitted.
4) The data in .debug_line is enough to produce valid stack traces with
function names and line numbers.

Reviewed by Eric Christopher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
38baeabb253f3e04d5b54bf834dbd9f5ebdc9e5c 13-Apr-2012 John McCall <rjmccall@apple.com> Don't enter cleanups for unreachable variables. It's impossible to
jump into these scopes, and the cleanup-entering code sometimes wants
to do some operations first (e.g. a GEP), which can leave us with
unparented IR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
355bba72ca52c4a70ca3c3802412c03a6ec31f24 30-Mar-2012 John McCall <rjmccall@apple.com> Make sure we unique static-local decls across multiple emissions of
the function body, but do so in a way that doesn't make any assumptions
about the static local actually having a proper, unique mangling,
since apparently we don't do that correctly at all.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
0f30a12ce7b3d4d86c9ca9072f587da77c8eef34 30-Mar-2012 Chandler Carruth <chandlerc@gmail.com> Revert r153723, and its follow-ups r153728 and r153733.

These patches cause us to miscompile and/or reject code with static
function-local variables in an extern-C context. Previously, we were
papering over this as long as the variables are within the same
translation unit, and had not seen any failures in the wild. We still
need a proper fix, which involves mangling static locals inside of an
extern-C block (as GCC already does), but this patch causes pretty
widespread regressions. Firefox, and many other applications no longer
build.

Lots of test cases have been posted to the list in response to this
commit, so there should be no problem reproducing the issues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
49d26d2817180ccde605c987f79cd3a5b57639cd 30-Mar-2012 John McCall <rjmccall@apple.com> Do the static-locals thing properly in the face of unions and
other things which might mess with the variable's type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9993cc7b56b6bcb73914d707eb3afb29c2f85db8 30-Mar-2012 John McCall <rjmccall@apple.com> When emitting a static local variable in C++, handle
the case that the variable already exists. Partly this is just
protection against people making crazy declarations with custom
asm labels or extern "C" names that intentionally collide with
the manglings of such variables, but the main reason is that we
can actually emit a static local variable twice with the
requirement that it match up. There may be other cases with
(e.g.) the various nested functions, but the main exemplar is
with constructor variants, where we can be forced into
double-emitting the function body under certain circumstances
like (currently) the presence of virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
649b4a1a9b5e6f768ca0cb84bd97b00f51083e15 29-Mar-2012 Chad Rosier <mcrosier@apple.com> Revert r153613 as it's causing large compile-time regressions on the nightly testers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
57cd1b89cd91433ce1991a5bff36fe776a263796 29-Mar-2012 John McCall <rjmccall@apple.com> When we can't prove that the target of an aggregate copy is
a complete object, the memcpy needs to use the data size of
the structure instead of its sizeof() value. Fixes PR12204.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.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/CGDecl.cpp
71cba34b6e2d3fb81860bd2176ab7003eaf2e918 09-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Make sure we update the static local decl address map when we are forced to rebuild a global because of the initializer. <rdar://problem/10957867>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
972edf0534d8a50f87fac1d0ff34eb22f593df11 19-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Make heap-allocation of std::initializer_list 'work'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
7acebfb71f16a8bb15add402ab915d23c64d912f 18-Feb-2012 Chad Rosier <mcrosier@apple.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
32cf1f27ae8620e7b79bb4e81a067187c0aab7ae 17-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Basic code generation support for std::initializer_list.

We now generate temporary arrays to back std::initializer_list objects
initialized with braces. The initializer_list is then made to point at
the array. We support both ptr+size and start+end forms, although
the latter is untested.

Array lifetime is correct for temporary std::initializer_lists (e.g.
call arguments) and local variables. It is untested for new expressions
and member initializers.

Things left to do:
Massively increase the amount of testing. I need to write tests for
start+end init lists, temporary objects created as a side effect of
initializing init list objects, new expressions, member initialization,
creation of temporary objects (e.g. std::vector) for initializer lists,
and probably more.
Get lifetime "right" for member initializers and new expressions. Not
that either are very useful.
Implement list-initialization of array new expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a9b21d22bb9337649723a8477b5cb15f83451e7d 17-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Bug fix: do not emit static const local variables with mutable members
as constants.

Refactor and simplify all the separate checks for whether a type can be
emitted as a constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
de5d3c717684f3821b8db58037bc7140acf134aa 17-Feb-2012 John McCall <rjmccall@apple.com> Whether an argument is required (in contrast with being an
optional argument passed through the variadic ellipsis)
potentially affects how we need to lower it. Propagate
this information down to the various getFunctionInfo(...)
overloads on CodeGenTypes. Furthermore, rename those
overloads to clarify their distinct purposes, and make
sure we're calling the right one in the right place.
This has a nice side-effect of making it easier to construct
a function type, since the 'variadic' bit is no longer
separable.

This shouldn't really change anything for our existing
platforms, with one minor exception --- we should now call
variadic ObjC methods with the ... in the "right place"
(see the test case), which I guess matters for anyone
running GNUStep on MIPS. Mostly it's just a substantial
clean-up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
7ca4850a3e3530fa6c93b64b740446e32c97f992 13-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Deal with a horrible C++11 special case. If a non-literal type has a constexpr
constructor, and that constructor is used to initialize an object of static
storage duration such that all members and bases are initialized by constant
expressions, constant initialization is performed. In this case, the object
can still have a non-trivial destructor, and if it does, we must emit a dynamic
initializer which performs no initialization and instead simply registers that
destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
b4e5e286a5cd156247720b1eb204abaa8e09568d 09-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> CWG issue 1405: mutable members are allowed in literal types, but can't undergo
lvalue-to-rvalue conversions in constant expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
f492cb1b62b9113d80d85d32515566d6c2a8cdb3 31-Jan-2012 Chris Lattner <sabre@nondot.org> enhance some optimization logic to handle ConstantDataSequential
as well as ConstantArray.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
ba4be25c90566f5f214c2ad0364840c5a04ba651 27-Jan-2012 Matt Beaumont-Gay <matthewbg@google.com> Placate gcc's -Wreturn-type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
516bbd42e62d709013824d6fb8445a0cfda3129a 26-Jan-2012 Peter Collingbourne <peter@pcc.me.uk> Use function pointers, rather than references, to pass Destroyers
around, in the process cleaning up the various gcc/msvc compiler
workarounds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
2d6a5670465cb3f1d811695a9f23e372508240d2 14-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> constexpr irgen: Add irgen support for APValue::Struct, APValue::Union,
APValue::Array and APValue::MemberPointer. All APValue values can now be emitted
as constants.

Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other
entrypoints dealing with constant member pointers are no longer necessary and
will be removed in a later change.

Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to
VarDecl::evaluateValue. This performs caching and deals with the nasty cases in
C++11 where a non-const object's initializer can refer indirectly to
previously-initialized fields within the same object.

Building the intermediate APValue object incurs a measurable performance hit on
pathological testcases with huge initializer lists, so we continue to build IR
directly from the Expr nodes for array and record types outside of C++11.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
bd9482d859a74bf2c45ef8b8aedec61c0e1c8374 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
51201882382fb40c9456a06c7f93d6ddd4a57712 30-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Unrevert r147271, reverted in r147361.

Also temporarily remove the assumption from IR gen that we can emit IR for every
constant we can fold, since it isn't currently true in C++11, to fix PR11676.

Original comment from r147271:

constexpr: perform zero-initialization prior to / instead of performing a
constructor call when appropriate. Thanks to Eli for spotting this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
375bb1413c041055262c8a416f20d10474a5eda9 27-Dec-2011 Douglas Gregor <dgregor@apple.com> Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl
covers both declarations (@class) and definitions (@interface) of an
Objective-C class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
6da2c716017d5c8530ec99779524491ebc5dadb8 03-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Switch LValue so that it exposes alignment in CharUnits. (No functional change.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
15de72cf580840c61e5704c2f8a2b56f9d0638e1 03-Dec-2011 Douglas Gregor <dgregor@apple.com> Introduce a module import declaration, so that we properly represent, e.g.,

__import_module__ std.vector;

in the AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4bb6686274c292669bac9e658b3c210a317ee61a 02-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix wrong-code bug when a const automatic variable of struct type has both a
mutable member and a constant initializer. We'd previously promoted such
variables to global constants, resulting in nasal demons if the mutable member
was modified.

This is only a temporary fix. The subtle interplay between isConstantInitializer
and CGExprConstant is very bug-prone; there are some other issues in this area
which I will be addressing in subsequent, more major reworking of this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
7a71524d9b51b01e124719f8e538f2bb85eae07e 29-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> The cheap version of getName() is sufficient here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
c3c8f2225dfb3a162020fb6a5ae61904ee5b4f5c 21-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Simplify code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
5c247db14566f4668efb63cf5184e62dd40039b5 20-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: allow __asm renaming on static local variables.

Fixes PR4777.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
ddfb8d1026d8f9001d8111bd8a96d89301aa11cd 03-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Fix the alignment on scalar parameter variables so that it matches what the AST thinks it should be. Per report on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.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/CGDecl.cpp
8c25fc584ce27d59df9923f153e8a132dde58d04 19-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: introduce support for function scope __local variables

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e289d81369914678db386f6aa86faf8f178e245d 13-Sep-2011 Douglas Gregor <dgregor@apple.com> Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.

AST serialization changes are next up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
77f68bb90af93b95045fb994e7cd68137adcc132 10-Sep-2011 Julien Lerouge <jlerouge@apple.com> Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://8037476.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
410ffb2bc5f072d58a73c14560345bcf77dec1cc 26-Aug-2011 John McCall <rjmccall@apple.com> Track whether an AggValueSlot is potentially aliased, and do not
emit call results into potentially aliased slots. This allows us
to properly mark indirect return slots as noalias, at the cost
of requiring an extra memcpy when assigning an aggregate call
result into a l-value. It also brings us into compliance with
the x86-64 ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
7c2349be2d11143a2e59a167fd43362a3bf4585e 25-Aug-2011 John McCall <rjmccall@apple.com> Use stronger typing for the flags on AggValueSlot and require
creators to tell us whether something needs GC barriers.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
045c84264f7c9d5b166e9a93d8fe62c777d3039c 25-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> blocks - capturing logic of byref block variable's expression
statement initializer makes safe assumption when a substatement
is encounterred (with a fix me).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
736a9c211c065784f7a7889ade55aa569a89520e 24-Aug-2011 Eric Christopher <echristo@apple.com> Make constant aggregate constant initializers private linkage.
After talking with John making this the case for all of these is
the right way to go.

Fixes rdar://9804564 and PR10414

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
c6fad60801ff271d425ff8f635b66998008ffd7a 24-Aug-2011 Eric Christopher <echristo@apple.com> Whitespace and 80-col cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e1f549028bd6850e7d85ab6bce7626050d2e8ace 24-Aug-2011 Eric Christopher <echristo@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
5033be1b3a6f1d1c1ab9b2d284267c8f6f531f2e 23-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> checking for __block variable captured by given
stmt expression, recursively walk down all substatements
of the stmt expression. // rdar://10001085


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
b9dbab1e78917c80704428f948f7b2ef8110f8e1 23-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> block IRgen - Fixes a crash when determining if given block variable
is captured by a given statement expression. // rdar://10001085


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
af0f4d0b2e38c810effc8b024ad2fb6604eec5d3 14-Aug-2011 Francois Pichet <pichet2000@gmail.com> Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization.

Example:
template <class T>
class A {
public:
template <class U> void f(U p) { }
template <> void f(int p) { } // <== class scope specialization
};

This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code.
BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
fb7208119a60f68c87e7d4b6e4b87371871abb49 28-Jul-2011 John McCall <rjmccall@apple.com> Fix a couple of problems with initialization and assignment to
__block variables where the act of initialization/assignment
itself causes the __block variable to be copied to the heap
because the variable is of block type and is being assigned
a block literal which captures the variable.

rdar://problem/9814099



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
642116259e8df6286063a17361c20e95b5017a0a 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename getInstantiationLineNumber to getExpansionLineNumber in both
SourceManager and FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
0f6ac7cf7bc6a02c1a5c19d2c90ec0d1dd7786e7 22-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
fbf780a9d1dbb191fc40c8af967c590e08724b74 13-Jul-2011 John McCall <rjmccall@apple.com> Okay, that rule about zero-length arrays applies to destroying
them, too.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
ad346f4f678ab1c3222425641d851dc63e9dfa1a 12-Jul-2011 John McCall <rjmccall@apple.com> Generalize Cleanup::Emit's "isForEH" parameter into a set
of flags. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9928c4805aa8d5fabd488d0d0c5aeb64fd50f0e3 12-Jul-2011 John McCall <rjmccall@apple.com> Switch field destruction over to use the new destroyer-based API
and kill a lot of redundant code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
2673c68aa58e277ebc755b71d81aca618cdedbf9 11-Jul-2011 John McCall <rjmccall@apple.com> Fix a lot of problems with the partial destruction of arrays:
- an off-by-one error in emission of irregular array limits for
InitListExprs
- use an EH partial-destruction cleanup within the normal
array-destruction cleanup
- get the branch destinations right for the empty check
Also some refactoring which unfortunately obscures these changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
0850e8d1b093cfe1fc2fdf533a0e264ef9d5412e 09-Jul-2011 John McCall <rjmccall@apple.com> More compiler workarounds. I have to admit that I was not
expecting so much concentrated oddity on what seemed like a
trivial feature. Thanks to François Pichet for doing the
MSVC legwork here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
7566aa2e47c2452f06cd59917748299065e83607 09-Jul-2011 John McCall <rjmccall@apple.com> GCC 4.2 compatibility hack.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
bdc4d80956c83a486e58d3df6bb524a1f66ff574 09-Jul-2011 John McCall <rjmccall@apple.com> A number of array-related IR-gen cleanups.
- Emit default-initialization of arrays that were partially initialized
with initializer lists with a loop, rather than emitting the default
initializer N times;
- support destroying VLAs of non-trivial type, although this is not
yet exposed to users; and
- support the partial destruction of arrays initialized with
initializer lists when an initializer throws an exception.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
bcc3e660a1fdc19722157ef3e2f133418856ca3d 01-Jul-2011 Douglas Gregor <dgregor@apple.com> Don't zero-initialize default-initialized local variables that have
trivial default constructors. This generated-code regression was
caused by r131796, which had simplified the handling of default
initialization in Sema. Fixes <rdar://problem/9694300>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8fefc8e245c47daacae7a7fb218677fdcb85d122 29-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: fix a IRGen crash when checking for
accessibility of an initializer which is a compound
statement. // rdar://9694706


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
0c24c808e4dce43e88abf2d5f98546b901bd4315 25-Jun-2011 John McCall <rjmccall@apple.com> Honor objc_precise_lifetime in GC mode by feeding the value
in the variable to an inline asm which gets run when the variable
goes out of scope.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
19bd77c64937d6818c61f2aa9e6a9d51c65d0356 18-Jun-2011 Benjamin Kramer <benny.kra@googlemail.com> Remove dead variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
7acddacc921cd0b3f813443a8641eeddb82dfbd4 17-Jun-2011 John McCall <rjmccall@apple.com> Objective-C fast enumeration loop variables are not retained in ARC, but
they should still be officially __strong for the purposes of errors,
block capture, etc. Make a new bit on variables, isARCPseudoStrong(),
and set this for 'self' and these enumeration-loop variables. Change
the code that was looking for the old patterns to look for this bit,
and change IR generation to find this bit and treat the resulting
variable as __unsafe_unretained for the purposes of init/destroy in
the two places it can come up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a07398ed98ea2b55ad7a505a3aab18aed93b149f 16-Jun-2011 John McCall <rjmccall@apple.com> Restore correct use of GC barriers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
175d6596a53508d8ac2ff844672bab0dd0bd7c91 16-Jun-2011 John McCall <rjmccall@apple.com> Suppress a warning in -Asserts builds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
98703d32ff37fbfbcfd844241d2be44b8f80cf9f 15-Jun-2011 Devang Patel <dpatel@apple.com> Do not emit stoppoint before emitting debug info for parameters.
- llvm.dbg.declare already receives line number information from ParmDecl
- Additional extra stoppoint messes up gdb's understanding of where function body starts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9198126067a447f8aaccf9fff09be294c8bcb81e 04-Jun-2011 Devang Patel <dpatel@apple.com> Rework r132576.
Emit debug info only if there is an insertion point. The debug info should not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
c594abdb78b67d477c9bdd24c3600aec3dc2eda4 03-Jun-2011 Devang Patel <dpatel@apple.com> Emit debug info only if there is an insertion point. The debug info should not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
460980d3b9d045288041bf8b826899795c60ca1d 28-May-2011 Eli Friedman <eli.friedman@gmail.com> Add unnamed_addr to internal globals which are only used as an operand to memcpy. (Spotted by looking at IR.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e 05-May-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement support for C++0x alias templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
04c9a49ee251424b11d7c4e8b1c23637684cecb6 02-May-2011 Eli Friedman <eli.friedman@gmail.com> Simplify code a bit by using CallArgList::add. No intended functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
162e1c1b487352434552147967c3dd296ebee2f7 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Support for C++11 (non-template) alias declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
12e6d838e22be421b8870b0b3d4069569ee669a5 05-Apr-2011 Devang Patel <dpatel@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
5af02db5a48476e0748f135369663080eae87c64 31-Mar-2011 John McCall <rjmccall@apple.com> Move all the significant __block code into CGBlocks.cpp. No functionality
change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
207f4d8543529221932af82836016a2ef066c917 18-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for language-specific address spaces. On top of that,
add support for the OpenCL __private, __local, __constant and
__global address spaces, as well as the __read_only, _read_write and
__write_only image access specifiers. Patch originally by ARM;
language-specific address space support by myself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
60d3365b46eb826fba44483583c0051ac5c41fe3 08-Mar-2011 John McCall <rjmccall@apple.com> Extract a function to emit an arbitrary expression as if it were the initializer
for a local variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4707b9acf75c68c90278757ffd6a05b2544bc1eb 07-Mar-2011 Douglas Gregor <dgregor@apple.com> Revert r126422 "Use private linkage to avoid symbol conflicts in
corner cases like the one in PR9301." which caused PR9416.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
093ac461b37a573dcf226fa55faed96f318169b9 03-Mar-2011 Devang Patel <dpatel@apple.com> Encode argument numbering in debug info so that code generator can emit them in order.
This fixes few blocks.exp regressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
41ba26701de859128ebe48a957c286e5dc01475f 02-Mar-2011 Devang Patel <dpatel@apple.com> revert r126858.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126874 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
810b07ccf7b19f532402d24064df543bb0518acd 02-Mar-2011 Devang Patel <dpatel@apple.com> Encode argument numbering in debug info so that code generator can emit them in order.
This fixes few blocks.exp regressions.

Reapply r126795 with a fix (one character change) for gdb testsuite regressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3da5cb2d6e582ab3acb5dd0d2fd8ab31922750be 02-Mar-2011 Devang Patel <dpatel@apple.com> Revert r126794.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8a04585eba8a87a660c9030c9cdef34c8c9f85c6 01-Mar-2011 Devang Patel <dpatel@apple.com> Encode argument numbering in debug info so that code generator can emit them in order.
This fixes few blocks.exp regressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
bab380c2c8b3527e0448eb6252bc75f0de37fbca 24-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Use private linkage to avoid symbol conflicts in corner cases like the one
in PR9301.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8178df3b39ab923ff5d24538812628abee33df79 22-Feb-2011 John McCall <rjmccall@apple.com> Emit the structure layout of the block literal parameter to a block
invocation function into the debug info. Rather than faking up a class,
which is tricky because of the custom layout we do, we just emit a struct
directly from the layout information we've already got.

Also, don't emit an unnecessarily parameter alloca for this "variable".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
57b3b6a60856eaec30fd876a8a3face8f7e3ad7b 22-Feb-2011 John McCall <rjmccall@apple.com> Establish the iteration variable of an ObjC for-in loop before
emitting the collection expression. Fixes some really, really broken
code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
34695856c0e67b3765b46304cc71b5d2cd5b71c7 22-Feb-2011 John McCall <rjmccall@apple.com> Reorganize the emission of local variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
0d3c985ad5b07121149957e5993cf1e3df26a413 18-Feb-2011 John McCall <rjmccall@apple.com> The flags we're supposed to write into a byref struct are *not* the
_Block_object_* flags; it's just BLOCK_HAS_COPY_DISPOSE or not.

Also, we don't need to chase forwarding pointers prior to calling
_Block_object_dispose; _Block_object_dispose in fact already does
this.

rdar://problem/9006315



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4ae493cccbfbf122ec6ebac0e330232c22fa8489 18-Feb-2011 Chris Lattner <sabre@nondot.org> implement basic support for __label__. I wouldn't be shocked if there are
bugs from other clients that don't expect to see a LabelDecl in a DeclStmt,
but if so they should be easy to fix.

This implements most of PR3429 and rdar://8287027



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
ad8dcf4a9df0e24051dc31bf9e6f3cd138a34298 17-Feb-2011 Chris Lattner <sabre@nondot.org> Step #1/N of implementing support for __label__: split labels into
LabelDecl and LabelStmt. There is a 1-1 correspondence between the
two, but this simplifies a bunch of code by itself. This is because
labels are the only place where we previously had references to random
other statements, causing grief for AST serialization and other stuff.

This does cause one regression (attr(unused) doesn't silence unused
label warnings) which I'll address next.

This does fix some minor bugs:
1. "The only valid attribute " diagnostic was capitalized.
2. Various diagnostics printed as ''labelname'' instead of 'labelname'
3. This reduces duplication of label checking between functions and blocks.

Review appreciated, particularly for the cindex and template bits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a03733b28b7c0a6dde83561a8a391c1067f404a5 17-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Ensure that the NRVO flag has some block to insert into. Fixes PR9178!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
34753802931fddcf57bd62c5b83bdca1a23017d7 16-Feb-2011 Devang Patel <dpatel@apple.com> Simplify test to check an aggregate argument that has non trivial constructor or destructor.
This patch rewrites r125142.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
570729e71654f0564bf2ce6504f8629a96850914 09-Feb-2011 Devang Patel <dpatel@apple.com> If an aggregate argument is passed indirectly because it has non trivial
destructor or copy constructor than let debug info know about it.

Radar 8945514.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
d16c2cf1cafa413709aa487cbbd5dc392f1ba1ff 08-Feb-2011 John McCall <rjmccall@apple.com> Reorganize CodeGen{Function,Module} to eliminate the unfortunate
Block{Function,Module} base class. Minor other refactorings.

Fixed a few address-space bugs while I was there.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
3ad32c8d93eb65d1d4943d7df567fc9b4f55d137 28-Jan-2011 John McCall <rjmccall@apple.com> Convert the exception-freeing cleanup over to the conditional cleanups code,
fixing a crash which probably nobody was ever going to see. In doing so,
fix a horrendous number of problems with the conditional-cleanups code.
Also, make conditional cleanups re-use the cleanup's activation variable,
which avoids some unfortunate repetitiveness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
52a80e19ad688091723a52ad53337767bb0ac684 27-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Fixes an IRgen bug where __block variable is
referenced in the block-literal initializer
of that variable. // rdar://8893785


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
06f486ecd05bd6788da97c39164c1903a084c26d 18-Jan-2011 Ken Dyck <ken.dyck@onsemi.com> Replace calls to CharUnits::fromQuantity() with ones to
ASTContext::toCharUnitsFromBits() when converting from bit sizes to char units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
14110477887e3dc168ffc6c191e72d705051f99e 13-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Move name mangling support from CodeGen to AST. In the
process, perform a number of refactorings:

- Move MiscNameMangler member functions to MangleContext
- Remove GlobalDecl dependency from MangleContext
- Make MangleContext abstract and move Itanium/Microsoft functionality
to their own classes/files
- Implement ASTContext::createMangleContext and have CodeGen use it

No (intended) functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
0ec89f928ce5b3294c2ed644ec1a42656e1af39d 30-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for declaring register contraints in variables. They are only used
in asm statements:

register int foo asm("rdi");

asm("..." : ... "r" (foo) ...

We also only accept these variables if the constraint in the asm statement is "r".

This fixes most of PR3933.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a9de3fa8a9c22dd419eda9be53e8c7c428cce1c0 30-Dec-2010 Nick Lewycky <nicholas@mxc.ca> Correct function name in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9f0c7cc36d29cf591c33962931f5862847145f3e 30-Dec-2010 Benjamin Kramer <benny.kra@googlemail.com> Simplify mem{cpy, move, set} creation with IRBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
830937bc1100fba7682f7c32c40512085870f50c 02-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> IR Gen. part of API support for __block cxx
objects imported into blocks. //rdar://8594790.
Will have a test case coming (as well as one
sent to llvm test suite).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
1b726771d00762fb5c4c2638e60d134c385493ae 02-Dec-2010 Chris Lattner <sabre@nondot.org> Improve codegen for initializer lists to use memset more aggressively
when an initializer is variable (I handled the constant case in a previous
patch). This has three pieces:

1. Enhance AggValueSlot to have a 'isZeroed' bit to tell CGExprAgg that
the memory being stored into has previously been memset to zero.
2. Teach CGExprAgg to not emit stores of zero to isZeroed memory.
3. Teach CodeGenFunction::EmitAggExpr to scan initializers to determine
whether they are profitable to emit a memset + inividual stores vs
stores for everything.

The heuristic used is that a global has to be more than 16 bytes and
has to be 3/4 zero to be candidate for this xform. The two testcases
are illustrative of the scenarios this catches. We now codegen test9 into:

call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 400, i32 4, i1 false)
%.array = getelementptr inbounds [100 x i32]* %Arr, i32 0, i32 0
%tmp = load i32* %X.addr, align 4
store i32 %tmp, i32* %.array

and test10 into:

call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 392, i32 8, i1 false)
%tmp = getelementptr inbounds %struct.b* %S, i32 0, i32 0
%tmp1 = getelementptr inbounds %struct.a* %tmp, i32 0, i32 0
%tmp2 = load i32* %X.addr, align 4
store i32 %tmp2, i32* %tmp1, align 4
%tmp5 = getelementptr inbounds %struct.b* %S, i32 0, i32 3
%tmp10 = getelementptr inbounds %struct.a* %tmp5, i32 0, i32 4
%tmp11 = load i32* %X.addr, align 4
store i32 %tmp11, i32* %tmp10, align 4

Previously we produced 99 stores of zero for test9 and also tons for test10.
This xforms should substantially speed up -O0 builds when it kicks in as well
as reducing code size and optimizer heartburn on insane cases. This resolves
PR279.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
c0f31fd08537b65ad92db8ce860747e3402a07e6 02-Dec-2010 Chris Lattner <sabre@nondot.org> attempt to fix a buildbot failure, apparently apache fails to build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
70b02943ddee9ee31e9641ab3f5eb0dc874b7e03 02-Dec-2010 Chris Lattner <sabre@nondot.org> Enhance the init generation logic to emit a memset followed by a few stores when
a global is larger than 32 bytes and has fewer than 6 non-zero values in the
initializer. Previously we'd turn something like this:

char test8(int X) {
char str[10000] = "abc";

into a 10K global variable which we then memcpy'd from. Now we generate:

%str = alloca [10000 x i8], align 16
%tmp = getelementptr inbounds [10000 x i8]* %str, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* %tmp, i8 0, i64 10000, i32 16, i1 false)
store i8 97, i8* %tmp, align 16
%0 = getelementptr [10000 x i8]* %str, i64 0, i64 1
store i8 98, i8* %0, align 1
%1 = getelementptr [10000 x i8]* %str, i64 0, i64 2
store i8 99, i8* %1, align 2

Which is much smaller in space and also likely faster.

This is part of PR279



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
94cd011edcffdabd3cbc520830ccf8e793e08b62 01-Dec-2010 Chris Lattner <sabre@nondot.org> add some infrastructure that will let us codegen
http://llvm.org/bugs/show_bug.cgi?id=279#c3 better.

No functionality change yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4c53dc1ebde9956b3d2ced1a811b49533737549b 01-Dec-2010 Chris Lattner <sabre@nondot.org> get some i32/i8/i1 constants from Builder, which is much less painful than
using ConstantInt::get.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
faa5bfcaaf6fc5a21ae112919d368f2636c58768 01-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Declaring local static in global block
literal declaration caused crash in CodeGen.
This patch fixes it. pr8707


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
41f5e66d44ae1142df82f40d4445c4a5710fa423 21-Nov-2010 Francois Pichet <pichet2000@gmail.com> Fix warning: enumeration value 'IndirectField' not handled in switch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e38be617437ccdcc180c5a49e447cbcd07539292 17-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes synthesis of type for the object which holds info.
about a __block cxx object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
2715b207a6a22970441da162313e1729d54dc24e 15-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Some cleanup of block API code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3030eb82593097502469a8b3fc26112c79c75605 06-Nov-2010 John McCall <rjmccall@apple.com> Simplify the logic for emitting guard variables for template static
data members by delaying the emission of the initializer until after
linkage and visibility have been set on the global. Also, don't
emit a guard unless the variable actually ends up with vague linkage,
and don't use thread-safe statics in any case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
112c967bd5c862a0f5d7913aa06700c048807db8 02-Nov-2010 John McCall <rjmccall@apple.com> Ensure that static local variables in function templates inherit the
visibility of their function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
b6bbcc9995186799a60ce17d0c1acff31601653a 15-Oct-2010 John McCall <rjmccall@apple.com> Death to blocks, or at least the word "block" in one particular obnoxiously
ambiguous context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
34fdee3771efcfc02333d0d99f29d01a7d2e2d27 06-Oct-2010 John McCall <rjmccall@apple.com> Re-enable EH cleanups to destroy __block variables, now that we have a moment to
deal with the consequences. Fixes rdar://problem/8224178.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
5cd91b513455fd7753e8815b54f0a49bbca6602d 08-Sep-2010 John McCall <rjmccall@apple.com> Implement ARM static local initialization guards, which are more compact than
Itanium guards and use a slightly different compiled-in API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
09349145d7e9b2142a9cef94e30eb8b70ce99bdc 08-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Local static block variable referecned in its
block-literal initializer expression causes IRgen to crash.
This patch fixes by saving it in StaticLocalDecl map
already used for such purposes. (radar 8390455).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
9c20fa9d46645480872f239a2fc631996ba7dc23 03-Sep-2010 John McCall <rjmccall@apple.com> A constant initializer never matches the type of the variable it's
initializing; it at best matches the element type of the variable
it's initializing. Fixes PR8073.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3e7cf38810ec39be938b635ddd41e3cefde86883 03-Sep-2010 Daniel Dunbar <daniel@zuster.org> Revert "Another i1 vs. i8 type mismatch issue. This time", it breaks some projects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
73556e0d961e2d58eae232e647c9def8da1caecf 02-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Another i1 vs. i8 type mismatch issue. This time
a 'bool' byref variable in memory. Fixes radar 8382559.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
d931b086984257de68868a64a235c2b4b34003fb 26-Aug-2010 John McCall <rjmccall@apple.com> De-memberify the VarDecl and FunctionDecl StorageClass enums.
This lets us remove Sema.h's dependency on Expr.h and Decl.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
91a16fa3265686b90054715eea504d9b4a13438b 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument and
update callers as best I can.
- This is a work in progress, our alignment handling is very horrible / sketchy -- I am just aiming for monotonic improvement.
- Serious review appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4cac2a157c5a3d7c8f6cd79b52e891184623f29e 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Use Ty consistently in this function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4204f07fc8bffe6d320b2de95fea274ccf37a17b 02-Aug-2010 John McCall <rjmccall@apple.com> Further adjustments to -Wglobal-constructors; works for references and direct
initializations now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
db2cfecf0eb6683be103b8550026817426da2d42 22-Jul-2010 John McCall <rjmccall@apple.com> Turn off EH cleanups for __block variables; they caused some internal buildbot
failures. There's a radar tracking this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
1f0fca54676cfa8616e7f3cd7a26788ab937e3cd 21-Jul-2010 John McCall <rjmccall@apple.com> Rename LazyCleanup -> Cleanup. No functionality change for these last three
commits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
d87150999833d756269d84ca6e4127dc99fdcf63 21-Jul-2010 John McCall <rjmccall@apple.com> Switch some random local-decl cleanups over to using lazy cleanups. Turn on
the block-release unwind cleanup: we're never going to test it if we don't turn
it on.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
bf40cb518312dde1c07e44fcae59bc4eec65589c 16-Jul-2010 John McCall <rjmccall@apple.com> When deferring the emission of declarations with initializers in C++, remember
the order they appeared in the translation unit. If they get emitted, put them
in their proper order. Fixes rdar://problem/7458115



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
da65ea86482bc116906edfb9ba1d7124f76cc867 13-Jul-2010 John McCall <rjmccall@apple.com> Teach IR generation how to lazily emit cleanups. This has a lot of advantages,
mostly in avoiding unnecessary work at compile time but also in producing more
sensible block orderings.

Move the destructor cleanups for local variables over to use lazy cleanups.
Eventually all cleanups will do this; for now we have some awkward code
duplication.

Tell IR generation just to never produce landing pads in -fno-exceptions.
This is a much more comprehensive solution to a problem which previously was
half-solved by checks in most cleanup-generation spots.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
f1549f66a8216a78112286e3978cea2c29d6334c 06-Jul-2010 John McCall <rjmccall@apple.com> Validated by nightly-test runs on x86 and x86-64 darwin, including after
self-host. Hopefully these results hold up on different platforms.

I tried to keep the GNU ObjC runtime happy, but it's hard for me to test.
Reimplement how clang generates IR for exceptions. Instead of creating new
invoke destinations which sequentially chain to the previous destination,
push a more semantic representation of *why* we need the cleanup/catch/filter
behavior, then collect that information into a single landing pad upon request.

Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional
control flow) are generated, since it's actually fairly closely tied in with
the former. Remove the need to track which cleanup scope a block is associated
with.

Document a lot of previously poorly-understood (by me, at least) behavior.

The new framework implements the Horrible Hack (tm), which requires every
landing pad to have a catch-all so that inlining will work. Clang no longer
requires the Horrible Hack just to make exceptions flow correctly within
a function, however. The HH is an unfortunate requirement of LLVM's EH IR.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
1d110e05e0ff48c1c7a483d6b7fd094cdf28316a 01-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove unnecessary ASTContext parameter from
CXXRecordDecl::getDestructor(); no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
32f36baa6c8d491c374af622b4e3ac28d597453c 26-Jun-2010 Anders Carlsson <andersca@mac.com> Change EmitReferenceBindingToExpr to take a decl instead of a boolean.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9a20d55807cc2f6534a9c51a46cc8143ed16786d 22-Jun-2010 Anders Carlsson <andersca@mac.com> Switch over to the new caching version of getMangledName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
06057cef0bcd7804e80f3ce2bbe352178396c715 16-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Move CodeGenOptions.h *back* into Frontend. This should have been done when the
dependency edge was reversed such that CodeGen depends on Frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
6206d53f67613958ae1b023aba337ebb46f11a8b 05-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added AccessSpecDecl node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9a55591af3e5506b95a9718e15380129fbfc5ebc 30-May-2010 Sean Hunt <rideau3@gmail.com> Convert DeclNodes to use TableGen.

The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
707bef3207a1459dc49ebc3c2493ec9a35e06ab8 28-May-2010 Dan Gohman <gohman@apple.com> This cast is no longer required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4c464b9702af8ec5e76d5eb184e76df1d40c23ec 26-May-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to fix a irgen crash accessing an initialized local static
variable in a local function. Fixes pr7101.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8b2423361648c39a7d8a3c5e8129e12006deac32 25-May-2010 John McCall <rjmccall@apple.com> If a function definition has any sort of weak linkage, its static local
variables should have that linkage. Otherwise, its static local
variables should have internal linkage. To avoid computing this excessively,
set a function's linkage before we emit code for it.

Previously we were assigning weak linkage to the static variables of
static inline functions in C++, with predictably terrible results. This
fixes that and also gives better linkage than 'weak' when merging is required.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3d91bbcdab155181556969cad6ec97014405aced 17-May-2010 Douglas Gregor <dgregor@apple.com> Ensure that destructors are called for NRVO'd objects when the
function does not return. Thanks to Eli for pointing out this corner
case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
b5b30b96e0accaf3c78a19c3febba5136dae8386 15-May-2010 Douglas Gregor <dgregor@apple.com> When applying the named return value optimization, we still need to
destroy the variable along the exceptional edge; it's only during
normal execution that we avoid destroying this variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
d86c477fb5d3fc34864afecbbb5443da9355e8fb 15-May-2010 Douglas Gregor <dgregor@apple.com> Implement a simple form of the C++ named return value optimization for
return statements. We perform NRVO only when all of the return
statements in the function return the same variable. Fixes some link
failures in Boost.Interprocess (which is relying on NRVO), and
probably improves performance for some C++ applications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
fe67f3bfc09caa66ab1398c03418c35bea77caf4 04-May-2010 John McCall <rjmccall@apple.com> Emit the globals, metadata, etc. associated with static variables even when
they're unreachable. This matters because (if they're POD, or if this is C)
the scope containing the variable might be reachable even if the variable
isn't. Fixes PR7044.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3c347f25b507740c3e41de70819f8fbbee4cde89 04-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a Code Gen. Crash when calling destructor on a __block
variabe. Blocks and their construction/destruction is
wip though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e65ce966b6865b686b0a9ba4fc72dfadf3e83701 03-May-2010 John McCall <rjmccall@apple.com> Just bail out immediately when emitting an unreachable function-local static
variable. Surprisingly, this does seem to be the right way to solve this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8e6404ca28d6bbb76e97ea2a53a74816c2a74665 03-May-2010 Anders Carlsson <andersca@mac.com> Add the same 'ForVirtualBase' parameter to EmitCXXDestructorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
08688ac8aaf02b565619181903319d32b546bcf5 23-Apr-2010 Douglas Gregor <dgregor@apple.com> I hate default statements. Fixes PR6874.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
63326a53418b4853a83b360ce1dbdb10c5739fc7 19-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Some renaming of methods, fixes typo
(related to PR6769).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
65ad5a42cca954e070428dcc499b62393aa7a6d3 18-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Local static variables must be available module-wise
as they are accessible in static methods in a class
local to the same function. Fixes PR6769.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3ecd785aff34381f3704d9cb28fe3ef85af759de 04-Apr-2010 Mon P Wang <wangmp@apple.com> Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
c90f56d9f144b2dce88d1c141ddf0e0940e62e63 02-Apr-2010 Mon P Wang <wangmp@apple.com> Revert r100193 since it causes failures in objc in clang


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8facca6cafa8d471768fe14074b1301e24e08fec 02-Apr-2010 Mon P Wang <wangmp@apple.com> Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
b5896c37922e09529e61db4b3dd946cf2ecb211e 31-Mar-2010 Bob Wilson <bob.wilson@apple.com> Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3b5caa20652c43d00229bac972b78bee44a0ee9f 30-Mar-2010 Mon P Wang <wangmp@apple.com> Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
f746aa6a8f538be914173a4aef2d9a2fd9f99d17 20-Mar-2010 John McCall <rjmccall@apple.com> Change CodeGenModule to rely on the Module's symbol table instead of
shadowing it in the GlobalDeclMap. Eliminates the string-uniquing
requirement for mangled names, which should help C++ codegen times a little.
Forces us to do string lookups instead of pointer lookups, which might hurt
codegen times a little across the board. We'll see how it plays out.

Removing the string-uniquing requirement implicitly fixes any bugs like
PR6635 which arose from the fact that we had multiple uniquing tables for
different kinds of identifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
20e1c7ea56103b7de26e5ab4086739bdc3a3d850 12-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a rare corner case bug which exposed a serious block API generation
when initialized variable is a byref block variable and is referenced recursively
in the initializer (you guessed it, it is block implementation of
fibonacci number). Fix, on the other hand is trvial, by generating the
API for byref variable before API for its initializer. We will have this
test added to our internal test suite as a clang-style test is not possible
due to very convoluted IR sequence. Fixes radar 7745514.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
0af9523607754a945b49d8a1ebae6631fc927921 11-Mar-2010 Chris Lattner <sabre@nondot.org> set alignment on static locals properly, patch by Arnaud de Grandmaison!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
195337d2e5d4625ae9dc1328c7cdbc7115b0261b 09-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add CreateMemTemp, for creating an temporary memory object for a particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing.

- This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome!

PR6240.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e86bcf0d9ea62cc75e545787896083f8a6bc81a1 08-Feb-2010 Daniel Dunbar <daniel@zuster.org> Reapply r95393, without the change to CGExpr. I was wrong in assuming that the
element type always matched the converted LLVM type for ExprType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
f6b89a173827457c28ac77b7cf091a24ef484e8a 07-Feb-2010 Anders Carlsson <andersca@mac.com> Use the right linkage for static variables inside C++ inline functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a5002106fbe5563aa59eba007416074d5b1ffecf 05-Feb-2010 Douglas Gregor <dgregor@apple.com> Revert r95393, which broke Clang's self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
027627115ca1c486e420db7cd8439f25531135bb 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Use hasAggregateLLVMType instead of isSingleValueType() for cases that
need to deal with aggregates specially; this is consistent with the rest of IRgen.

Also, simplify EmitParmDecl and don't worry about using Decl::getNameAsString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a64a869312066ff6119d1d7ae03f88ce499e3f82 03-Feb-2010 Anders Carlsson <andersca@mac.com> Revert the new reference binding code; I came up with a way simpler solution for the reference binding bug that is preventing self-hosting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3aba09376c5f49c4c8d176109ea4835bc2c528ee 31-Jan-2010 Anders Carlsson <andersca@mac.com> Start creating CXXBindReferenceExpr nodes when binding complex types to references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8b752f10c394b140f9ef89e049cbad1a7676fc25 27-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and,
now that the "InBytes" part of the name is implied by the return type, rename
it to getDeclAlign().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
687cc4a850b59116efee061018f0d8df50728b82 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store size
of LLVM types in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
071c81065a282edba989bcf7c260b5838a59db50 26-Jan-2010 Anders Carlsson <andersca@mac.com> Make sure to always mark a global variable as not being constant if it has a C++ initializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
f3c47c9525153aea2de0ec4bd615b9cf2d81c103 24-Dec-2009 Anders Carlsson <andersca@mac.com> Pass ReturnValueSlot to EmitCall. No functionality change yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
bdc601b196c48d4cd56a5ceb45d41ae4e87371ab 22-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Move the implementation of ASTContext::getTypeSizeInChars() to the .cpp file to
avoid #including CharUnits.h in ASTContext.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4273f7068f16863f2469b45a3f00c3b4217bdbb4 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Change the return type of ASTContext::getTypeSizeInChars() from uint64_t to the
new opaque value type, CharUnits. This will help us avoid accidentally mixing
quantities that are in bit and character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
cc906ef220c9be2644ad942457766d46a0b3651e 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Rename getByteSize() and getTypeSizeInBytes() in ASTContext to getCharWidth()
and getTypeSizeInChars() to reflect their basis in character type units, not
that of a possibly independent architecture-specific byte.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
d88ea5687968640ada2bc5a10211cbeb68a671ec 09-Dec-2009 Mike Stump <mrs@apple.com> Add cleanups for exceptional edges. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
155fd79b3a6dd25fbac1716fa3f8148de1e53c49 08-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Use StringRef in CGDebugInfo::EmitFunctionStart.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a4d6ca174b7b8ffeee7392e74b69242f78e94b51 08-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Use a Twine to concatenate the name instead of going through std::string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
761acc19d966a67f2175783d09412d6ac9463400 05-Dec-2009 Chris Lattner <sabre@nondot.org> implement rdar://7346691 by codegen'ing struct/array initializers
to a memset or a memcpy from a global when possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
ff933b709777ce535efb455a10dd487de5694998 05-Dec-2009 Chris Lattner <sabre@nondot.org> simplify a condition and add a testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
7b0ca3fa6f9e89d81db96fe51d4d73bf69d17edc 03-Dec-2009 Anders Carlsson <andersca@mac.com> Handle static_assert inside functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
730203088e9909e304c4868cbca72ee2652335bf 03-Dec-2009 Mike Stump <mrs@apple.com> Add missing branch to exit. Seemingly obvious when I look at the
code, but to track this down was laborious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
d5782d5013ef5dbe033d1c3d1334e01c5996e06b 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Rename CleanupScope -> DelayedCleanupBlock. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
fa133a183cb546a70fd5b029db72cb8f8561bec2 23-Nov-2009 Daniel Dunbar <daniel@zuster.org> Teach CodeGenFunction::EmitDecl to ignore Using and UsingShadow decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
19df37c55437bf3b8de85f93e55d05a57e900dff 18-Nov-2009 Mike Stump <mrs@apple.com> Trim whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
2811ccf48d6d898c42cc4cfad37abedb36236d20 12-Nov-2009 Chandler Carruth <chandlerc@gmail.com> Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.
This resolves the layering violation where CodeGen depended on Frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
89c49f09b0292dc7c03885f6c765d667a9837597 09-Nov-2009 Douglas Gregor <dgregor@apple.com> Make sure that Type::getAs<ArrayType>() (or Type::getAs<subclass of
ArrayType>()) does not instantiate. Update all callers that used this
unsafe feature to use the appropriate ASTContext::getAs*ArrayType method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
7799621ad7d16f3c6a1aeda024312d63ecd77777 04-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch extends CleanupScope to support destruction
of array objects on block exit. Patch is by Anders Calrsson.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
59876c2713683d1538ca45bb14c2f415862fb716 04-Nov-2009 Tanya Lattner <tonic@nondot.org> Merge constant array and structures. This will create a global variables for arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
6fba7464867180f672b6fa55894485dd8a093804 29-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for destruction of array of objects on block exit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
04c688a3b7f075d836f3b0f4c7d9a10200b8c968 21-Oct-2009 Mike Stump <mrs@apple.com> Fix 80-col violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
77378b25cd11d6464eb74a6b436231589b750270 16-Oct-2009 Nuno Lopes <nunoplopes@sapo.pt> ignore 'using' directive in CodeGenFunction::EmitDecl(). this fixes PR5085

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
fee53aa127b3d6af507af7e3c9f8fd3a975333fb 10-Oct-2009 Devang Patel <dpatel@apple.com> Revert 83567.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e23429269f9cd86d6fed25432763fad520eb7f82 08-Oct-2009 Devang Patel <dpatel@apple.com> Record location info before emiting alloca for arguments. This allows arguments to have proper location info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
41f8a13ac7fa734faef2d8a36feebc3c9a1eed77 26-Sep-2009 Anders Carlsson <andersca@mac.com> Set alignment on static function level decls and VLAs. Fixes PR5060.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
39605b4eab472a37cec287f9d4663805e60346f3 22-Sep-2009 Mike Stump <mrs@apple.com> Improve debug info generation for __block variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e0c8822eec9d3b2afa62c5e6168a8a8f52aeb2c4 13-Sep-2009 Anders Carlsson <andersca@mac.com> Fix another byref bug. This should hopefully get QuickLookPlugins building successfully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9e8725a434cd70ab74fa914554d7933a4bb1e501 12-Sep-2009 Mike Stump <mrs@apple.com> Add FIXME for alignments that won't be honored.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
18be84c37b2b796fddfb36447c2b29141d7fdd18 12-Sep-2009 Anders Carlsson <andersca@mac.com> Add support for __block variables with alignment greater than __alignof(void *).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
7dfa4079f4b37507048b19bfc693d3b015d9dd11 12-Sep-2009 Anders Carlsson <andersca@mac.com> For __block variables, cache the LLVM types as well as which LLVM field where the variable is stored.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
555b4bb2749aea2ec8e2adc351a71ec1cb9bdc33 11-Sep-2009 Anders Carlsson <andersca@mac.com> GlobalDecl doesn't have an explicit constructor anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3604386e1eacbe9da4ab13a2648a44ca581057d3 10-Sep-2009 Anders Carlsson <andersca@mac.com> Make the forwarding member of block byref structs be a pointer to the block byref struct itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a2b6b76f4bd86ca1b7784ee7a8d790fb804df248 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Suppress build warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
9ad5513b0f9d3999705659fb1aeb0e6c53455f43 09-Sep-2009 Anders Carlsson <andersca@mac.com> Make BuildByRefType take a ValueDecl instead of a QualType and an alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
622f9dc76bdc4f4d6920907f4fb64a3222aa6566 17-Aug-2009 Anders Carlsson <andersca@mac.com> Remove an ErrorUnsupported call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
14c5cbf59cffee52275230922283a247de407712 16-Aug-2009 Anders Carlsson <andersca@mac.com> Add an IsInitializer flag to EmitAnyExpr. This is used to prevent temporaries from being destroyed when they're bound to a reference variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
3b2e16b3d25f6b311dba2871e2a566c96238c3d2 08-Aug-2009 Anders Carlsson <andersca@mac.com> Refactor some code and implement support for global destructors for static variables.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
667f36accdacde57f101f8b6b61abb912f7a8e73 03-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> assert(nyi) on attempt to destruct an array of objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
6ca0b32227c21ba4bc66e8f1bdbf767b563567a8 03-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for destructor calls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
b0d0ea042116c1f451d3db8ceff9f1dd92bc36d2 02-Aug-2009 Anders Carlsson <andersca@mac.com> use CodeGenModule::EmitNullConstant in a couple of places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.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/CGDecl.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/CGDecl.cpp
3c4972def972f8ca44dcd0561779a12aaa6fec97 29-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
0d9c54cc6255696937905d7f3a7a6c5eca7d4fde 26-Jul-2009 Daniel Dunbar <daniel@zuster.org> Switch to using llvm::Value::getName()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
25b6ebf0f8c07514250ec76c987f84b6810d4d17 19-Jul-2009 Daniel Dunbar <daniel@zuster.org> Fix thinko.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
d286f05f1234bac289173f0eed88d7ecbaea0099 19-Jul-2009 Daniel Dunbar <daniel@zuster.org> Avoid generation of dead code in a few more situations.
- Emit variable declarations as "simple", we want to avoid forcing the creation
of a dummy basic block, but still need to make the variable available for
later use.

- With that, we can now skip IRgen for other unreachable statements (which
don't define a label).

- Anders, I added two fixmes on calls to EmitVLASize, can you check them?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.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/CGDecl.cpp
1c431b323d776362490bbf7cc796b74fedaf19f2 08-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
40b598eea1310ec9ed554d56ce3e25b34c585458 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the attribute-related methods of Decl.
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.

This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
bd0fec9250a783ad67d023e53ab0877a74f0be11 26-Jun-2009 Devang Patel <dpatel@apple.com> typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
68584ed35ad819a1668e3f527ba7f5dd4ae6a333 18-Jun-2009 Douglas Gregor <dgregor@apple.com> Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3899a7fb9c7eeed19cc38d082921dd8b3d0d6624 06-Jun-2009 Mike Stump <mrs@apple.com> As an optimization, we maintain a cache of generated
___Block_byref_id_object_dispose and ___Block_byref_id_object_copy
functions so that we can simply reuse instead of creating a new one.
Additionally, add an assert to ensure no one yet tries to align a
__block variable beyond the alignment of a pointer as the codegen is
incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4a18784dea763be146df68546e6dbf4233c33077 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Add IRGen support for local variables of reference type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4381d4b83cdab592dbda85c54672dbe06de5b1d9 22-May-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Targets like PIC16 generate Static decls for automatic variables, emit the appropriate debug descriptor as well in that case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
b4aa4664ec851573624a7a29c6c750fc1d5cc268 19-May-2009 Anders Carlsson <andersca@mac.com> Pass the destination QualType to EmitStoreOfScalar. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
cc0e354c92dd1713d7d8f041a8c4e0ca77c1c31b 18-May-2009 Anders Carlsson <andersca@mac.com> Since we miscompile many cases when declaring a variable with a reference type, make them unsupported for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
fd0e628aa8a1e3932445559cb1d950fee11ea9a9 15-May-2009 Mike Stump <mrs@apple.com> Fixup debug information for the location information for __block
variables. For this to work, the backend needs to handle more complex
forms for locations.

A typical utterance would be:

%forwarding = getelementptr %0* %use_by_ref, i32 0, i32 1 ; <i8**> [#uses=1]
%0 = load i8** %forwarding ; <i8*> [#uses=1]
%1 = bitcast i8* %0 to %0* ; <%0*> [#uses=1]
%x = getelementptr %0* %1, i32 0, i32 4 ; <i32*> [#uses=1]
%2 = bitcast i32* %x to { }* ; <{ }*> [#uses=1]
call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*))

Presently when selection finds something it doesn't understand, it
just avoids generating any information, which is safe, just
incomplete. Radar 6867696


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
b4880bab7fc1b61267cfd9a0ad52188e7a828cb3 12-May-2009 Chris Lattner <sabre@nondot.org> push GlobalDecl through enough of the CodeGenModule interfaces
to allow us to support generation of deferred ctors/dtors.
It looks like codegen isn't emitting a call to the dtor in
member-functions.cpp:test2, but when it does, its body should
get emitted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
cabec03f5d1aa3bb7b5c99867c5e75f38452afab 26-Apr-2009 Anders Carlsson <andersca@mac.com> When calling the cleanup function specified by __attribute__((cleanup)), make sure to bitcast the argument so it has the same type as the first argument of the cleanup function. Fixes <rdar://problem/6827047>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
56ebe5082da7411fb37479e230b52735f77cff35 19-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR3853: Add CodeGen support for __thread.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
5466c7b0ca8ce662e2c0bc295cecba2b78d6957d 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Audit __private_extern__ handling.
- Exposed quite a few Sema issues and a CodeGen crash.

- See FIXMEs in test case, and in SemaDecl.cpp (PR3983).

I'm skeptical that __private_extern__ should actually be a storage
class value. I think that __private_extern__ basically amounts to
extern A __attribute__((visibility("hidden")))
and would be better off handled (a) as that, or (b) with an extra bit
in the VarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
b11fa0d25d86169f0e0a29d5398116c0212bb787 13-Apr-2009 Daniel Dunbar <daniel@zuster.org> Update to use hasAttr() instead of getAttr().
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
11c7d32ac2f8a784a3cc4714a9f1977ab5859185 10-Apr-2009 Chris Lattner <sabre@nondot.org> Make messages consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
b75863d53b8a2bbf0ece8e6df2b6e5be7f3896c4 10-Apr-2009 Chris Lattner <sabre@nondot.org> reject codegen of __thread variables as unimplemented, rdar://6775265


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e9352cc9818ba59e7cf88500ef048991c90f3821 08-Apr-2009 Anders Carlsson <andersca@mac.com> Add a destination type argument to EmitConstantExpr. This will be used for when the destination has a reference type. (No functionality change yet)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
08ae3de4c90a9c4b79fedf878760144df6758ecc 02-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Don't use static globals for params as it confuses the optimzer that their values are never being used in the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
17c35acad1248ec919e76992c03b47d848502a15 02-Apr-2009 Anders Carlsson <andersca@mac.com> When compiling C++ code, always mangle the names of static block var decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
ba8639dd25b0bc9b9c49b305047d069342a126f2 30-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen does not yet supports __asm__ on a variable
declaration. Reject it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
3403084886b3d0fc23eee2b5708f0ac0329423e0 22-Mar-2009 Chris Lattner <sabre@nondot.org> don't set the name of a call instruction to "call" in release-asserts
build. This shaves another 3% off.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
f1466848dce9c4c75d96a6cabdc8db560e26aac8 22-Mar-2009 Chris Lattner <sabre@nondot.org> fix CreateTempAlloca to not set a name on the alloca for temporaries
in release-assert builds. For automatic variables, explicitly set
a name with setName that does not make a temporary std::string.

This speeds up -emit-llvm-only -disable-free on PR3810 by 4.6%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a8b60c9bd8e992bed2096aa2c9982c3045e8247c 21-Mar-2009 Mike Stump <mrs@apple.com> Fixup codegen for nested block literals so that we generate
copy_helpers and dispose_helpers as necessary for them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
6cc88f78fd36d3511b89412b193494b3e423cbff 20-Mar-2009 Mike Stump <mrs@apple.com> Fix codegen for support for super inside block literal expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
863cffbaf66b0a46df17d45d8b497d762dcabd6b 07-Mar-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Mangle param names with .arg. only.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
f4bc312fc701100af8d3b5af73366715169f5585 07-Mar-2009 Mike Stump <mrs@apple.com> Remove some FIXMEs for block literals that should be close to working.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
ee09422b014151a6a47c2ce704a81e94467bc786 06-Mar-2009 Mike Stump <mrs@apple.com> Complete __Block_byref_id_object_copy cogegen for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
1851b68aaa6717783609f366f5d87bbd0030f189 06-Mar-2009 Mike Stump <mrs@apple.com> Finish off __Block_byref_id_object_dispose codegen for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
416d92ef0b8ad96ab679de7856bdb55c5f31d814 06-Mar-2009 Mike Stump <mrs@apple.com> Remove extra arg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
45031c08c608e548ac12caf0547f89574e994b96 06-Mar-2009 Mike Stump <mrs@apple.com> More codegen support for the copy/dispose helpers for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a4f668f3b7e03629066a01b04e415cb2b4655daf 06-Mar-2009 Mike Stump <mrs@apple.com> Framework for codegen for copy/dispose helpers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
fe345572459b69a6b680322fef504b4f8bd98dd7 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Don't mangle names of local variables.
- For one thing, this adds unneeded overhead; for another, this
routine can be used to emit unnamed decls which we shouldn't try to
mangle.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
00470a1c4c44c5ed26bad9a38b4d3904b02d7a28 05-Mar-2009 Mike Stump <mrs@apple.com> prep work for copy/destroy helpers for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
d9e0fae40a902ddbd4d53ef60ba7fb908788fe60 05-Mar-2009 Mike Stump <mrs@apple.com> Avoid dispose calls when only doing gc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
797b6327571f9d7b1c45404a56ddcbf9b9298ae8 05-Mar-2009 Mike Stump <mrs@apple.com> Add codegen support for __block variables to call _Block_object_dispose as necessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a3460ac8a17bd82fc21db9ff8db7c7efcb5bb1a9 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Continuation of PR3687: fix more places to use the right type for
booleans.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
074dda6d81315d3e1414ce018325c166bcb02028 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Comment fix: change a question to an answer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
dab514fc30242c7afd6c03956e46136c400fb0d3 04-Mar-2009 Mike Stump <mrs@apple.com> Improved ABI compliance for __block variables. No testcases yet as we
still give an unsupported error for them due to the fact this is a
work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
e5731f81497d11f95027a500a3ee118f4fc9e1be 25-Feb-2009 Daniel Dunbar <daniel@zuster.org> Allow constant initializers to reference their defining decl.
- PR3662.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a985b31fc36aa22859983b4a5e7385796c627bdc 25-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fold GeneraticStaticBlockVarDecl into callers.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
0096acf421c4609ce7f43e8b05f8c5ca866d4611 25-Feb-2009 Daniel Dunbar <daniel@zuster.org> Pull COdeGenFunction::CreateStaticBlockVarDecl (just for creating the
global variable) out of GenerateStaticBlockVarDecl.
- No intended functionality change.
- Prep for some mild cleanups and PR3662.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9c2f06b373e6209447baf1fd5a86dd6602c573a8 22-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Last part of PR3254: use the same alignment computation in Sema and
CodeGen. I'm not sure whether this actually makes any visible
difference, but it's better to be consistent anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
4451bd943c7dcdc4ac1542d176e548cf73021d97 20-Feb-2009 Mike Stump <mrs@apple.com> Fix spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
6ec3668a2608b63473207319f5ceff9bbd22ea51 19-Feb-2009 Douglas Gregor <dgregor@apple.com> Address Chris's comments regarding C++ name mangling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
d60f2fbf69df08e952377b498c036f269395024d 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> Change EmitConstantExpr to allow failure.

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e4c9238795d206e22694101d6d727d2ee1f0028d 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Set constant bit on static block vars as well. Patch by Anders Johnson!q


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
5c61d97ad442b2c0bbecb617c8f21857ce1fff6d 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> IRgen support for attribute used.
- PR3566


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e896d98548b02223c7740d807a0aa6e20fba7079 13-Feb-2009 Anders Carlsson <andersca@mac.com> Add CodeGen support for the nodebug attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
5f2bfd4811996abb783aa6c7254c56baa6930e8c 13-Feb-2009 Douglas Gregor <dgregor@apple.com> Add basic support for C++ name mangling according to the Itanium C++
ABI to the CodeGen library. Since C++ code-generation is so
incomplete, we can't exercise much of this mangling code. However, a
few smoke tests show that it's doing the same thing as GCC. When C++
codegen matures, we'll extend the ABI tester to verify name-mangling
as well, and complete the implementation here.

At this point, the major client of name mangling is in the uses of the
new "overloadable" attribute in C, which allows overloading. Any
"overloadable" function in C (or in an extern "C" block in C++) will
be mangled the same way that the corresponding C++ function would be
mangled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
30510abee628c645285e01cfd4779610d46a822c 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Honor attribute section on static block var decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
193cdbe73e77171a5800ca6ecd783d909764dc88 10-Feb-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Function parameters for PIC16 are like local variables. So use the keyword ".auto." to mangle their names. The working of PIC16AsmPrinter relies on that keyword currently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
5ecb1b9377a6408486df5a10538bdc932706e053 09-Feb-2009 Anders Carlsson <andersca@mac.com> Use the new cleanup infrastructure for VLAs. The next iteration of patches will remove the old Obj-C EH cleanup code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
69c68b7454dc7f47def4ebf593a584d0f02c1ddb 08-Feb-2009 Anders Carlsson <andersca@mac.com> Emit a cleanup block for the cleanup attribute

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
36a2ada69fdb457b0e46d0ef452c150b360d8888 07-Feb-2009 Mike Stump <mrs@apple.com> Fixup goto codegen in and around VLAs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
45206ecf708bf03b04db07c2476b9f862127a8b1 03-Feb-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Targets that don't have stack use global address space for parameters.
Specify external linkage for such globals so that llvm optimizer do
not assume there values initialized as zero.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
c9e8f606787b0bc0c3b08e566b87cc1751694168 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Rename Expr::isConstantExpr to Expr::isConstantInitializer; this more
accurately states what the function is trying to do and how it is
different from Expr::isEvaluatable. Also get rid of a parameter that is both
unused and inaccurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
f7cf85b330bedd2877e1371fb0a83e99751ae162 16-Jan-2009 Chris Lattner <sabre@nondot.org> more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
fcdbb93749ed69aa9022437052c390522355ec3d 20-Dec-2008 Anders Carlsson <andersca@mac.com> Handle typedefs to VLAs (Emit the size expr when we encounter the typedef

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
60d35413662ebdcd1d31e34a8a7c665eb6977f1e 20-Dec-2008 Anders Carlsson <andersca@mac.com> Change EmitVLASize to take a QualType that must be a variably modified type.

Emit the size even if the declared type is a variably modified type. This lets us handle

void f(int n) {
int (*a)[n];

printf("size: %d\n", sizeof(*a));
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
f666b7780d04186521adcaedb0e15dfa4d5e6933 20-Dec-2008 Anders Carlsson <andersca@mac.com> Split up emitting of VLA sizes and getting the size of a VLA.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
eb91f0ecb420f481811f8812ac4d39087e8dd754 20-Dec-2008 Anders Carlsson <andersca@mac.com> Add some ErrorUnsupported calls and turn on VLA codegen again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.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/CGDecl.cpp
39f34e97d6a468f0a7dfa5664c61217cffc65b74 24-Nov-2008 Chris Lattner <sabre@nondot.org> Migrate some stuff from NamedDecl::getName() to
NamedDecl::getNameAsString() to make it more explicit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8ec03f58c33c33a917f54bb7f2cd61b6d7ffe0ca 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
assert if the name is not an identifier. Update callers to do the right
thing and avoid this method in unsafe cases. This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
2e1cd4264d363ca869bf37ef160902f211d21b8c 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Introduction the DeclarationName class, as a single, general method of
representing the names of declarations in the C family of
languages. DeclarationName is used in NamedDecl to store the name of
the declaration (naturally), and ObjCMethodDecl is now a NamedDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
9c85ba33ac85bbf5915f300a4b228bad7c693ee7 10-Nov-2008 Chris Lattner <sabre@nondot.org> reimplement debug info generation in terms of DebugInfo.h instead of
using MachineModuleInfo. This runs at about the same speed as the old
code, but fixes a bunch of bugs and is simpler and shorter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
31fc07df7f0fc89ebf83ca05a20b29de45a7598d 31-Oct-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wchar
etc more generic. For some targets, long may not be equal to pointer size. For
example: PIC16 has int as i16, ptr as i16 but long as i32.

Also fixed a few build warnings in assert() functions in CFRefCount.cpp,
CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
66031a5594bc9a7dc0dc5137c3e7955f835e4639 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Change CGDebugInfo::setLocation to just ignore invalid locations. This
simplifies clients.

Also, add assert that RegionStack is empty when the CGDebugInfo is
destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
35bc0821c4f80041724cd4c5c4889b2581546a41 15-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Simplify handling of struct/union/class tags.
Instead of using two sets of Decl kinds (Struct/Union/Class and CXXStruct/CXXUnion/CXXClass), use one 'Record' and one 'CXXRecord' Decl kind and make tag kind a property of TagDecl.
Cleans up the code a bit and better reflects that Decl class structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
5627377df5439a1d3d46a4e4cef4ae44f84a322b 17-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add support for ABIArgInfo::Expand
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
19567ee4314ad1bb5144efbb23442f6bc54cd16c 25-Aug-2008 Anders Carlsson <andersca@mac.com> Handle static variables inside obj-c methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
e1b29efab32d02e114046d33cca242a88585bf8a 22-Aug-2008 Anders Carlsson <andersca@mac.com> Add preliminary (and probably broken) codegen support for C++ static initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
b7ec246872b412f0e7bb9e93eacfd78cfa6adfb3 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add NeXT runtime support for generating methods.

Change CodeGenFunction::EmitParmDecl to take either a ParmVarDecl or an
ImplicitParamDecl.

Drop hasAggregateLLVMType from CodeGenModule.cpp (use version in
CodeGenFunction).

Change the Objective-C method generation to use EmitParmDecl for
implicit parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
c4a1dea2dc56bd1357ec91b829a0b9e68229a13e 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
- Moved Sema::getCurMethodDecl() out of line (dependent on
ObjCMethodDecl via dyn_cast).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.cpp
1e692ace08959399794363e77499b73da5494af9 14-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Basic support for volatile loads and stores. Stores the volatile
qualifier in the lvalue, and changes lvalue loads/stores to honor
the volatile flag. Places which need some further attention are marked
with FIXMEs.

Patch by Cédric Venet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
a7a6dc01b769283c46cba2812dc078c0b20a0f14 10-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make CodeGenFunction::EmitDecl() recognise CXXClass/CXXStruct/CXXUnion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
2659052c5d32deea3994d14f3c7d330666174a6f 08-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Don't crash emitting an initializer for a static local with union type.
This fix just makes sure to construct the global with the appropriate
type, and fixes up the one user this affects to compensate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
686226b538e72c5059ab7c9a8f87eb883193b645 05-Jun-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Emit debug information for global and static variables when -g is specified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
77eedd6fcea7b090cb0368d26ec65305a84dbc6c 31-May-2008 Eli Friedman <eli.friedman@gmail.com> Calculate alignment for local variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
cc9b16394fe6c9245dc4f8661a63d0c3937b62f0 30-May-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Emit parameter and local variable debug information with -g.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
d79a726dc3c8af61b486948c97a183c7fe5b0179 23-May-2008 Dan Gohman <gohman@apple.com> Change uses of llvm::Type::isFirstClassType to use the new
llvm::Type::isSingleValueType. Currently these two functions have
the same behavior, but soon isFirstClassType will return true for
struct and array types.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
2621fd1d6d3c5eadcae246859f62738645df7540 08-May-2008 Chris Lattner <sabre@nondot.org> Add basic support for the pic-* target triples and add support for
targets that do not support recursion (and thus codegen stack variables
as globals).

Patch contributed by Alireza Moshtaghi!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8bd4afeb876fd0015bb808eb2f3de1fe709658a7 19-Apr-2008 Nate Begeman <natebegeman@mac.com> Generate code for annotation attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
248a753f6b670692523c99afaeb8fe98f7ae3ca7 16-Apr-2008 Steve Naroff <snaroff@apple.com> Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().

This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.cpp
8bcfc5bef434d7052e28d0ce45182855659ebd3d 07-Apr-2008 Chris Lattner <sabre@nondot.org> remove the Decl::getCanonicalType() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDecl.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/CGDecl.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/CGDecl.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/CGDecl.cpp