History log of /external/clang/test/CodeGenCXX/global-init.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
899245792776dd219a3c36eb19b42272e270bc0c 27-Feb-2013 Bill Wendling <isanbard@gmail.com> Reapply r176133 with testcase fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
c2833111020d7a672bb4b547799fcd87ea4f8fb5 25-Feb-2013 Anna Zaks <ganna@apple.com> Revert "Add more attributes from the command line to functions."

This reverts commit 176009.

The commit is a likely cause of several buildbot failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
d620e09c13b1ca32434ce440abf5bb0f3d0979c5 25-Feb-2013 Bill Wendling <isanbard@gmail.com> Add more attributes from the command line to functions.

This is an ongoing process. Any command line option which a back-end cares about
should be added here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
f7a9da053f5bd6c18450c1796d953b42c3b7ad3a 20-Feb-2013 Bill Wendling <isanbard@gmail.com> Modify the tests to use attribute group references instead of listing the
function attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
60b70388e43d146d968a1cc0705b30cb2d7263fe 07-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Update documentation of HasSideEffects to match its callers' expectations, and
update implementation to match. An elidable, non-trivial constructor call is a
side-effect under this definition, but wasn't under the old one, because we are
not required to evaluate it even though it may have an effect.

Also rationalize checking for volatile reads: just look for lvalue-to-rvalue
conversions on volatile glvalues, and ignore whether a DeclRefExpr etc is for
a volatile variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
8ae4ec28451a16a57718286da3e476fc2f495c3f 07-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Teach Expr::HasSideEffects about all the Expr types, and fix a bug where it
was mistakenly classifying dynamic_casts which might throw as having no side
effects.

Switch it from a visitor to a switch, so it is kept up-to-date as future Expr
nodes are added. Move it from ExprConstant.cpp to Expr.cpp, since it's not
really related to constant expression evaluation.

Since we use HasSideEffect to determine whether to emit an unused global with
internal linkage, this has the effect of suppressing emission of globals in
some cases.

I've left many of the Objective-C cases conservatively assuming that the
expression has side-effects. I'll leave it to someone with better knowledge
of Objective-C than mine to improve them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.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/test/CodeGenCXX/global-init.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/test/CodeGenCXX/global-init.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/test/CodeGenCXX/global-init.cpp
eb9d81dff99d4996f41c93ce71b08aaf753cbae8 17-Apr-2011 Anders Carlsson <andersca@mac.com> When laying out bases in, always try the "base subobject" LLVM type. If it
turns out that a field or base needs to be laid out in the tail padding of
the base, CGRecordLayoutBuilder::ResizeLastBaseFieldIfNecessary will convert
it to an array of i8.

I've audited the new test results to make sure that they are still valid. I've
also verified that we pass a self-host with this change.

This (finally) fixes PR5589!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.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/test/CodeGenCXX/global-init.cpp
1d1a679090afe8468c6c95f8ab9c3192683ac69f 12-Apr-2011 John McCall <rjmccall@apple.com> Whoops.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
26fbc72b33bdbd20b0145bf117c64d373f8051e3 12-Apr-2011 John McCall <rjmccall@apple.com> Ignore indirect field declarations. Fixes PR9570.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
c532b502858032f377056dc8cba2fe43cba8702b 18-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Add unnamed_addr in CreateRuntimeVariable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
5c5a764fcd256df6f6cfbce5cdd2a2dfb2c45e95 31-Oct-2010 Anders Carlsson <andersca@mac.com> Teach the constant expr evaluator about derived-to-base casts when no virtual bases are involved. Fixes PR5974.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
6d311229f0b894f6a8acda2d78f06a4198b487b7 12-Aug-2010 John McCall <rjmccall@apple.com> Test for rdar://problem/8073696.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
39dad53772c42eb36ebec1c81c56ba99d038fb94 04-Aug-2010 John McCall <rjmccall@apple.com> Do a very simple pass over every function we emit to infer whether we can
mark it nounwind based on whether it contains any non-nounwind calls.
<rdar://problem/8087431>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.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/test/CodeGenCXX/global-init.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/test/CodeGenCXX/global-init.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/test/CodeGenCXX/global-init.cpp
9df792c199473ac1bd012b8018373680ac00c309 09-Jun-2010 Anders Carlsson <andersca@mac.com> Fix test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.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/test/CodeGenCXX/global-init.cpp
2ca4f633b21c65e1a4edc2405a768d7f5db564eb 05-Feb-2010 Anders Carlsson <andersca@mac.com> Fix the bug that was breaking self-host, and re-land the static ctor fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
90c1c58aa72fecb8c3211aa25d0ef726ca6bf876 05-Feb-2010 Douglas Gregor <dgregor@apple.com> Revert r95363 and r95375, which broke self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
7d94a9503c90fd26cd41a5cae3831d79e334526f 05-Feb-2010 Anders Carlsson <andersca@mac.com> If a global initializer has a non-trivial destructor it can't be emitted as a constant (even if it has a trivial constructor).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
fb8b69aef3377aaa786d1278aaae7e7b04ac095f 02-Feb-2010 John McCall <rjmccall@apple.com> Codegen CXXConstructExprs with trivial constructors as constants.
Eliminates a lot of spurious global initializers, fixing PR6205.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
74d644abe56809d9bcea7311f37aa9063ab9e064 08-Oct-2009 Anders Carlsson <andersca@mac.com> If a global initializer has a non-trivial constructor or destructor, we never want to defer generation of it, even if it is declared static.

With this change we're finally able to compile and run the (infamous)

#include <string>
#include <iostream>

int main(int argc, char **argv) {
std::cout << "Hello, World" << std::endl;
}

$ clang hello.cpp -lstdc++ -o hello
$ ./hello
Hello, World



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
a3f36ab6dd9567ae4d1f1703a8413df911b91863 08-Oct-2009 Anders Carlsson <andersca@mac.com> Port test over to FileCheck.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp
89ed31d3f9eeb8ec77c284a5cf404a74bf5e7acf 09-Aug-2009 Anders Carlsson <andersca@mac.com> Add support for global initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/CodeGenCXX/global-init.cpp