History log of /external/clang/lib/CodeGen/CGDeclCXX.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 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/CGDeclCXX.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/CodeGen/CGDeclCXX.cpp
9a3be4cfdf7858b2467f57448ab99f72a2926b35 02-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix crashes when creating global instances of polymorphic classes without fields

Reviewed at http://llvm-reviews.chandlerc.com/D1795

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
c5c6fa78fd0e6a15c5611e8a059359054cfbf9d5 10-Sep-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Mangle dynamic initializer stubs the same way MSVC does

Summary: Dynamic initializers are mangled as ??__E <name> YAXXZ.

Reviewers: timurrrr

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
942f9fe11d3a9583eef6bc4ca2549b1f0d1694da 10-Sep-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Implement guard variables for static initialization

Static locals requiring initialization are not thread safe on Windows.
Unfortunately, it's possible to create static locals that are actually
externally visible with inline functions and templates. As a result, we
have to implement an initialization guard scheme that is compatible with
TUs built by MSVC, which makes thread safety prohibitively difficult.

MSVC's scheme is that every function that requires a guard gets an i32
bitfield. Each static local is assigned a bit that indicates if it has
been initialized, up to 32 bits, at which point a new bitfield is
created. MSVC rejects inline functions with more than 32 static locals,
and the externally visible mangling (?_B) only allows for one guard
variable per function.

On Eli's recommendation, I used MangleNumberingContext to track which
bit each static corresponds to.

Implements PR16888.

Reviewers: rjmccall, eli.friedman

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
c47063e1e647c3749b1851e42c78ac52938d2fbb 04-Sep-2013 Reid Kleckner <reid@kleckner.net> Order initializers of static data members of explicit specializations

I tried to implement this properly in r189051, but I didn't have enough
test coverage. Richard kindly provided more test cases than I could
possibly imagine and now we should have the correct condition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
c7971a9efdf9880448a69aabb5182c3c27eecf6d 28-Aug-2013 David Blaikie <dblaikie@gmail.com> Revert "PR14569: Omit debug info for thunks"

This reverts commit r189320.

Alexey Samsonov and Dmitry Vyukov presented some arguments for keeping
these around - though it still seems like those tasks could be solved by
a tool just using the symbol table. In a very small number of cases,
thunks may be inlined & debug info might be able to save profilers &
similar tools from misclassifying those cases as part of the caller.

The extra changes here plumb through the VarDecl for various cases to
CodeGenFunction - this provides better fidelity through a few APIs but
generally just causes the CGF::StartFunction to fallback to using the
name of the IR function as the name in the debug info.

The changes to debug-info-global-ctor-dtor.cpp seem like goodness. The
two names that go missing (in favor of only emitting those names as
linkage names) are names that can be demangled - emitting them only as
the linkage name should encourage tools to do just that.

Again, thanks to Dinesh Dwivedi for investigation/work on this issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
c3030bc285d90a139fb74629daadef5617283203 26-Aug-2013 David Blaikie <dblaikie@gmail.com> Simplify/clean up debug info suppression in CodeGenFunction

CodeGenFunction is run on only one function - a new object is made for
each new function. I would add an assertion/flag to this effect, but
there's an exception: ObjC properties involve emitting helper functions
that are all emitted by the same CodeGenFunction object, so such a check
is not possible/correct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
b969e84ec398fde1bb6255a05babdc23e2841101 22-Aug-2013 Reid Kleckner <reid@kleckner.net> Add a separate llvm.global_ctors entry for linkonce_odr data initializers

Summary:
These typically come from static data members of class template
specializations. This accomplishes two things:

1. May expose GlobalOpt optimizations for Itanium C++ ABI code.
2. Works toward fixing double initialization in the Microsoft C++ ABI.

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
8f4bdc0e37b4b24a58a15ecf41d1355a3b3fdcbb 30-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Revert r180739 and r180748: they broke C++11 thread_local on non-Darwin systems and did not do the right thing on Darwin.

Original commit message:

Emit the TLS intialization functions into a list.

Add the TLS initialization functions to a list of initialization functions. The
back-end takes this list and places the function pointers into the correct
section. This way they're called before `main().'

<rdar://problem/13733006>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
7c6b7ba5f5410d4b552ee53c60d0690522c99959 30-Apr-2013 Bill Wendling <isanbard@gmail.com> Emit the TLS intialization functions into a list.

Add the TLS initialization functions to a list of initialization functions. The
back-end takes this list and places the function pointers into the correct
section. This way they're called before `main().'

<rdar://problem/13733006>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
c7b5f381ed41a238aa4c243f99170909f64a3414 26-Apr-2013 Benjamin Kramer <benny.kra@googlemail.com> ArrayRefize code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
b80a16eadd0dacabfc1c32412e243ccb99dd664d 19-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement CodeGen for C++11 thread_local, following the Itanium ABI specification as discussed on cxx-abi-dev.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
04e517650569598e847c2ab609672e6df93effe5 15-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> CodeGen support for function-local static thread_local variables with
non-constant constructors or non-trivial destructors. Plus bugfixes for
thread_local references bound to temporaries (the temporaries themselves are
lifetime-extended to become thread_local), and the corresponding case for
std::initializer_list.


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

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

Defining runtime functions locally is quite common in embedded
applications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
85aee96c62a99069ea60cb47d5ae69150ca44746 26-Feb-2013 Kostya Serebryany <kcc@google.com> Unify clang/llvm attributes for asan/tsan/msan (Clang part)

These are two related changes (one in llvm, one in clang).
LLVM:
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory

CLANG:
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))

for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
72390b39c545426023ec104afe8706395d732bad 20-Dec-2012 Bill Wendling <isanbard@gmail.com> Rename llvm::Attributes to llvm::Attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
ad017fa7a4df7389d245d02a49b3c79ed70bedb9 20-Dec-2012 Bill Wendling <isanbard@gmail.com> Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
094dbf917127a1228147587076d59ca45b7c258d 19-Dec-2012 Bill Wendling <isanbard@gmail.com> Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
4179ddd5752ec5a252ca1e1eb77a5c34b5835d3b 06-Nov-2012 Anton Korobeynikov <asl@math.spbu.ru> Implement codegen for init_priority attribute properly - make sure it
works between the modules.
No functionality change on Darwin/Windows.
This fixes PR11480.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
ca1b62a33cacee20d3bd756210d3211dd663209e 05-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Rename LangOptions members for address sanitizer and thread sanitizer from
*Sanitizer to Sanitize* in preparation for later patches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
34b41f80aad3679c545a4ba9bca9c1a318d41844 25-Oct-2012 Alexey Samsonov <samsonov@google.com> Initialize debug info for special cases of functions that lack declarations and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
a240df2ec1b374b3e9e7f760875ffb17cd64506f 16-Oct-2012 Alexey Samsonov <samsonov@google.com> Transform pattern:
if (CGM.getModuleDebugInfo())
DebugInfo = CGM.getModuleDebugInfo()
into a call:
maybeInitializeDebugInfo();

This is a simplification for a possible future fix of PR13942.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
fac631052809b59c1b66f687c08a743de7fb50e9 10-Oct-2012 Bill Wendling <isanbard@gmail.com> Have 'addFnAttr' take the attribute enum value. Then have it build the attribute object and add it appropriately. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
78d1a10e13a1abfd4830bccf2a97b2993da1ed5c 24-Jul-2012 Nick Lewycky <nicholas@mxc.ca> Emit debug info for dynamic initializers. Permit __attribute__((nodebug)) on
variables that have static storage duration, it removes debug info on the
emitted initializer function but not all debug info about this variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
b9d2b3b8edf7a0dc56e55acb1cf87338d5648daa 26-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] add missing asan instrumentation in generated global init functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
20bb175cb8ae5844034828db094fb948c0e3454a 01-May-2012 John McCall <rjmccall@apple.com> Abstract the emission of global destructors into ABI-specific code
and only consider using __cxa_atexit in the Itanium logic. The
default logic is to use atexit().

Emit "guarded" initializers in Microsoft mode unconditionally.
This is definitely not correct, but it's closer to correct than
just not emitting the initializer.

Based on a patch by Timur Iskhodzhanov!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
7444639f2739905054ef37f3f100f4bad8810062 13-Apr-2012 John McCall <rjmccall@apple.com> Fix a trivial oversight with apple-kext static local destructors
and add a test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
30fa3707c440222f65fcbb78ee8677462ea0d9ce 06-Apr-2012 John McCall <rjmccall@apple.com> Use atexit when __cxa_atexit isn't available instead of adding a
global destructor entry. For some reason this isn't enabled for
apple-kexts; it'd be good to have documentation for that.

Based on a patch by Nakamura Takumi!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
3f88f686e32949ffe02ccb551f482f9cf810358b 06-Apr-2012 John McCall <rjmccall@apple.com> Rename GenerateCXXGlobalDtorFunc to GenerateCXXGlobalDtorsFunc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.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/CGDeclCXX.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/CGDeclCXX.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/CGDeclCXX.cpp
a0786c91dfd920573e26c82e242143b6ec610b19 28-Mar-2012 NAKAMURA Takumi <geek4civic@gmail.com> CodeGen/CGDeclCXX.cpp: Twine-ize CreateGlobalInitOrDestructFunction().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
ef7844666b36226521e459d18f2834dacaa039e3 21-Feb-2012 Nick Lewycky <nicholas@mxc.ca> Emit the exact size for the invariant intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
00a8c3f6c979a11b15b2a4a4ce08c7888634d6cd 17-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Don't emit optimization-specific intrinsic at -O0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
abb943284cabd9131586c2758a4f02baba668ace 17-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> The clang half of r150794: after the construction of a global or static const
variable ends, if the variable has a trivial destructor and no mutable
subobjects then emit an llvm.invariant.start call for it. globalopt knows to
make the variable const when evaluating this.


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.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/CGDeclCXX.cpp
bcfd1f55bfbb3e5944cd5e03d07b343e280838c4 02-Sep-2011 Douglas Gregor <dgregor@apple.com> Extend the ASTContext constructor to delay the initialization of
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.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/CGDeclCXX.cpp
da549e8995c447542d5631b8b67fcc3a9582797a 29-Jul-2011 Jay Foad <jay.foad@gmail.com> Remove some unnecessary single element array temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.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/CGDeclCXX.cpp
4c7d9f1507d0f102bd4133bba63348636facd469 15-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert CallInst and InvokeInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
a91f6661c4685fecee6dc09bdaef73254c1aaa06 13-Jul-2011 John McCall <rjmccall@apple.com> Generalize the routine for destroying an object with static
storage duration, then explicitly exempt ownership-qualified
types from it.



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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
e67d1512f299e7f32182553f9941d61dae4f433e 01-Jul-2011 Douglas Gregor <dgregor@apple.com> Emit guard variables for any weak global that has a run-time
initializer. Previously, we only used guard variables for weak static
data members. Fixes <rdar://problem/9692249>.


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
54ec6c59d8b2e529fc3f07ae97415721f394ad92 06-May-2011 Axel Naumann <Axel.Naumann@cern.ch> Reset the emitted initializers.
This enables incremental codegen, where the initializer array can be removed from the module, such that only new initializers will be emitted and run.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
99ace16bc6962f1fc3dc45bbbdf2eb74e555a8ad 12-Apr-2011 John McCall <rjmccall@apple.com> Template static data members can have weak_odr linkage, not just
weak linkage. Also, fix a problem where global weak variables
with non-trivial initializers were getting guard variables, or at
least were checking for them and then crashing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
bd4a0732f2f261f8269a71c2090bc3e9d001eca6 20-Mar-2011 Anders Carlsson <andersca@mac.com> __cxa_atexit does not throw.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
32096695c76033a6b0b1747c439f7378a11e8312 18-Mar-2011 John McCall <rjmccall@apple.com> The Darwin kernel does not provide useful guard variable support.
Issue this as an IR-gen error; it's not really worthwhile doing this
"right", i.e. in Sema, because IR gen knows a lot of tricks beyond
what the constant evaluator knows.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
d26bc76c98006609002d9930f8840490e88ac5b5 09-Mar-2011 John McCall <rjmccall@apple.com> Use the "undergoes default argument promotion" bit on parameters to
simplify the logic of initializing function parameters so that we don't need
both a variable declaration and a type in FunctionArgList. This also means
that we need to propagate the CGFunctionInfo down in a lot of places rather
than recalculating it from the FAL. There's more we can do to eliminate
redundancy here, and I've left FIXMEs behind to do it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
9c6082fe89c61af697f017aa80937581cc2128d8 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Revert "Add CC_Win64ThisCall and set it in the necessary places."

This reverts commit 126863.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
88d117c2eedd7c5bec57ac983a98d5e12bdd2cc6 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Add CC_Win64ThisCall and set it in the necessary places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
7a17851eee37f933eb57a5af7e1a0eb455443f6a 28-Feb-2011 Anders Carlsson <andersca@mac.com> Get rid of the areExceptionsEnabled() getter from LangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
c1cfdf8647a499b6b3024f4bd14a236cddb23988 20-Feb-2011 Anders Carlsson <andersca@mac.com> Add a LangOptions::areExceptionsEnabled and start using it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
d6c9a0f06ce7e164024d8e4dbf2423a5c5035084 15-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> In -fapple-kext mode, global object construction code
ends up in the text segment. // rdar://8825235.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
0990b00ba0627d76d53432afe729041ca3f4579b 13-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Save getObjCGCAttrKind and use it in two places
for efficiancy (still part of //rdar://8761767).
Per John's comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
ec8051276e5ba5eb3f8dcb0ebb96e17495cbc2bf 13-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Generate write-barriers for global objc
assigns. // rdar://8761767


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
354e712c81fbb07c0ce5f06180788b25fffa1b56 27-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Do the guarding of instantiated static data members
on if its linkage is weak. Currently this is the
case but may change in the future. (part of radar
8562966).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
92d835a86ac334768d0b75936201e4fea3941c1f 27-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to provide guard when initializing instances
of static data member of a class template.
Fixes //rdar :// 8562966 and pr8409.


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
224124c7b85596157201a67a7ba12d2b0f5c153c 10-Aug-2010 John McCall <rjmccall@apple.com> When initializing a static local, pop the guard-abort EH cleanup after
the variable is fully initialized.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
85aca0f6a9da02bda705690fd56d0aa713604f08 30-Jul-2010 John McCall <rjmccall@apple.com> Emit global destructors even if the destroyed object has no initializers or has
an initializer requiring temporary object disposal.

Fixes rdar:://problem/8246444.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
e540e637cbb9e3963c512b179779b8afcc190026 21-Jul-2010 John McCall <rjmccall@apple.com> Switch the __cxa_guard_abort cleanup to being a lazy cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
044cc54a7d83c90857187c4cd4a0fd33664a7f7f 06-Jul-2010 John McCall <rjmccall@apple.com> When creating functions to run global initializers and destructors, mark them
as nounwind in -fno-exceptions. Fixes rdar://problem/8090834.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.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/CGDeclCXX.cpp
045a6d84a0fa672eb5d914be1bb8f3baa226beb3 27-Jun-2010 Anders Carlsson <andersca@mac.com> Correctly destroy reference temporaries with global storage. Remove ErrorUnsupported call when binding a global reference to a non-lvalue. Fixes PR7326.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
ec2830d930e306124c2ba6bf1060a3c71dced6ea 27-Jun-2010 Chris Lattner <sabre@nondot.org> tidy up OrderGlobalInits


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
f489688114275c821b1e647e26f71eeb94d8ab24 22-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Per Chris's comment, remove another static (this one
is a static comparator operator).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
581c78fcb238bbc962176c3dd8399770343c26eb 22-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Avoid using a local static for providing lexical
order of priorotized global object initializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
e0b691a25f801d8be552c9387863637b9526e639 21-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> In supporting init-priority, globals with the same init_priority must be
emitted in the order in which they are seen (still radar 8076356).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
027d7ed9d616d93ae7f02de79d17863725b14866 21-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Use more efficient API of SmallVector/array_pod_sort
for sorting (radar 8076356).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
9f967c5e4bbeb48caf6d0e62056b3d3fee20bf7c 21-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen for implementation of init-priority attribute.
Test case will be checked in llvm test suite.
(finishes off radar 8076356).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
810112e28dc839715d17b0a786f23aaa19600ac0 19-Jun-2010 Chris Lattner <sabre@nondot.org> Fix PR7097, a bad interaction between -fno-use-cxa-atexit and
-mconstructor-aliases by using a WeakVH instead of a raw pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
18af368c080b9d60e34e670cd01f7d2d3ad2ba48 09-Jun-2010 Anders Carlsson <andersca@mac.com> On Darwin, initialization and destruction functions should go into the __StaticInit section.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
9dc046e70d189457968e4c3b986da75b5d98ce8e 09-Jun-2010 Anders Carlsson <andersca@mac.com> Add a global CreateGlobalInitOrDestructFunction and use it for creating global init or destruction functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
5687a5cb5941744c42aaaa9a1e7cd6d7c4c07fbf 09-Jun-2010 Anders Carlsson <andersca@mac.com> Rename __tcf_ to __cxx_global_array_dtor. Remove the UniqueAggreDestructorCount from CodeGenFunction and let LLVM handle uniquing the internal functions instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
772913659894551b02f342e3577e7219e4f9a701 09-Jun-2010 Anders Carlsson <andersca@mac.com> Move GenerateCXXAggrDestructorHelper to CGDeclCXX.cpp where it belongs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
02e370a02f05b4a734fe5e8c88efc4ed9dac60fa 09-Jun-2010 Anders Carlsson <andersca@mac.com> Simplify GenerateCXXAggrDestructorHelper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
86a3a03667bdb0dcab7e6a2877dfd234b07a6d43 16-May-2010 Douglas Gregor <dgregor@apple.com> When initializing thread-safe statics, put the call to
__cxa_guard_abort along the exceptional edge into (in effect) a nested
"try" that rethrows after aborting. Fixes PR7144 and the remaining
Boost.ProgramOptions failures, along with the regressions that r103880
caused.

The crucial difference between this and r103880 is that we now follow
LLVM's little dance with the llvm.eh.exception and llvm.eh.selector
calls, then use _Unwind_Resume_or_Rethrow to rethrow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
1eb2e59338c4b9c0429fc39ca98662adc9e7a3f2 16-May-2010 Douglas Gregor <dgregor@apple.com> Revert r103880 (thread-safe static initialization w/ exceptions),
because it's causing strange linker errors. Unfixes PR7144.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
bfcc823a5c53dabab8cfc842bfea70e2b69cdee0 15-May-2010 Douglas Gregor <dgregor@apple.com> When initializing thread-safe statics, put the call to
__cxa_guard_abort along the exceptional edge into (in effect) a nested
"try" that rethrows after aborting. Fixes PR7144 and the remaining
Boost.ProgramOptions failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
cc6a44b8bdecd9fc70211146e8ba3853b1fac784 05-May-2010 Douglas Gregor <dgregor@apple.com> For thread-safe static initialization of local statics with
destructors, place the __cxa_atexit call after the __cxa_guard_release
call, mimicking GCC/LLVM-GCC behavior. Noticed while debugging
something related.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
c9a85f9b4cc8ed95ed7feeff554a74bf52bdc1f7 26-Apr-2010 Chris Lattner <sabre@nondot.org> emit dtors with the right calling convention in -fno-use-cxa-atexit
mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
efb0fa9e11f75af51744a6159530ef7cc8efa24a 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> C++: Add support for -fno-use-cxa-atexit.
- So much typing, so little gain...

Also, rename the __cxx_global_initialization function just to match llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
5c6846e64b8bbf620636dd688137a27ca8e66aa2 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Inline GenerateCXXGlobal[VarDecl]InitFunc into sole caller.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
a508b7de6c5246ab04ed69d0ab4e9977ec1fb4d4 07-Feb-2010 Anders Carlsson <andersca@mac.com> Add support for threadsafe statics, and make them the default (matching gcc).

Daniel, I'd appreciate a review of the driver/cc1 parts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.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/CGDeclCXX.cpp
616c1738099ec52e1973197b8b9447df92461d3f 25-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> global variable that binds reference to a non-lvalue reproted
as NYI now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
f7c00eda7f21ef89cfec48fa90b743a403b89d4b 25-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a code gen. bug involving compiling global references.
(fixes radar 7574896).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
6c6bda3b0b1d8adaac2ba3f4da7056e9f1eef52e 08-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Fix for PR5967: Make const-marking for LLVM globals correct for cases requiring
run-time initialization, and emit run-time initializers aggresively to avoid
ordering issues with deferred globals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
864143fe14b8059eed1413d38854b689f7b21016 10-Dec-2009 Anders Carlsson <andersca@mac.com> Actually store the pointer into the global variable, spotted by Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
c7974ca5312eefd00b9e927203def9fbd8c1d169 10-Dec-2009 Anders Carlsson <andersca@mac.com> Handle emitting static variables that have reference type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
fcbfdc1a93325471a262f0d94461273ae67ad3b6 10-Dec-2009 Anders Carlsson <andersca@mac.com> Separate generating code for static variables and global variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
eb4072ed06c884f1053047ad88846cbffd5ac62e 10-Dec-2009 Anders Carlsson <andersca@mac.com> Move more decl related functions to CGDeclCXX.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGDeclCXX.cpp
5ec2e7ccb08b2a1598f12b2c6f59c6f31d035b5b 10-Dec-2009 Anders Carlsson <andersca@mac.com> Add CGDeclCXX.cpp and move EmitCXXGlobalVarDeclInit there.

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