John McCall
7e9e2b47b9
Test for rdar://problem/8073696.
...
llvm-svn: 110907
2010-08-12 07:31:42 +00:00
John McCall
8601a75118
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>
llvm-svn: 110163
2010-08-03 22:46:07 +00:00
John McCall
45d494785d
Emit global destructors even if the destroyed object has no initializers or has
...
an initializer requiring temporary object disposal.
Fixes rdar:://problem/8246444.
llvm-svn: 109849
2010-07-30 04:56:58 +00:00
John McCall
70013b640f
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
llvm-svn: 108477
2010-07-15 23:40:35 +00:00
John McCall
466e221037
When creating functions to run global initializers and destructors, mark them
...
as nounwind in -fno-exceptions. Fixes rdar://problem/8090834.
llvm-svn: 107639
2010-07-06 04:38:10 +00:00
Anders Carlsson
13f7c7dd77
Fix test.
...
llvm-svn: 105668
2010-06-09 01:42:52 +00:00
Daniel Dunbar
fe06df4bf3
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.
llvm-svn: 99039
2010-03-20 04:15:41 +00:00
Anders Carlsson
cb86e1088a
Fix the bug that was breaking self-host, and re-land the static ctor fixes.
...
llvm-svn: 95400
2010-02-05 18:38:45 +00:00
Douglas Gregor
af77cd220a
Revert r95363 and r95375, which broke self-host.
...
llvm-svn: 95389
2010-02-05 16:18:08 +00:00
Anders Carlsson
ecac409cb0
If a global initializer has a non-trivial destructor it can't be emitted as a constant (even if it has a trivial constructor).
...
llvm-svn: 95363
2010-02-05 05:19:42 +00:00
John McCall
49786a6c31
Codegen CXXConstructExprs with trivial constructors as constants.
...
Eliminates a lot of spurious global initializers, fixing PR6205.
llvm-svn: 95077
2010-02-02 08:02:49 +00:00
Daniel Dunbar
8fbe78f6fc
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).
llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Anders Carlsson
a18ed9b113
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
llvm-svn: 83559
2009-10-08 17:28:59 +00:00
Anders Carlsson
9776bd61bc
Port test over to FileCheck.
...
llvm-svn: 83558
2009-10-08 17:22:47 +00:00
Dan Gohman
43b4484f87
Use the inbounds variant of getelementptr for common pointer arithmetic.
...
llvm-svn: 78756
2009-08-12 00:33:55 +00:00
Anders Carlsson
b8be93fc92
Add support for global initializers.
...
llvm-svn: 78515
2009-08-08 23:24:23 +00:00