Douglas Gregor
370eadf38d
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.
llvm-svn: 103088
2010-05-05 15:38:32 +00:00
John McCall
4a39ab8078
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.
llvm-svn: 103052
2010-05-04 20:45:42 +00:00
Chris Lattner
5e8416a77f
emit dtors with the right calling convention in -fno-use-cxa-atexit
...
mode.
llvm-svn: 102377
2010-04-26 20:35:54 +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
Daniel Dunbar
7572284f4f
IRgen: Inline GenerateCXXGlobal[VarDecl]InitFunc into sole caller.
...
llvm-svn: 99038
2010-03-20 04:15:29 +00:00
Anders Carlsson
fcd764a168
Add support for threadsafe statics, and make them the default (matching gcc).
...
Daniel, I'd appreciate a review of the driver/cc1 parts.
llvm-svn: 95508
2010-02-06 23:23:06 +00:00
Anders Carlsson
3b227bd629
Revert the new reference binding code; I came up with a way simpler solution for the reference binding bug that is preventing self-hosting.
...
llvm-svn: 95223
2010-02-03 16:38:03 +00:00
Fariborz Jahanian
5cda92820f
global variable that binds reference to a non-lvalue reproted
...
as NYI now.
llvm-svn: 94453
2010-01-25 21:40:39 +00:00
Fariborz Jahanian
210031b79c
Fix a code gen. bug involving compiling global references.
...
(fixes radar 7574896).
llvm-svn: 94434
2010-01-25 18:30:26 +00:00
Eli Friedman
5866fe306d
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.
llvm-svn: 92976
2010-01-08 00:50:11 +00:00
Anders Carlsson
fefc7b8e7b
Actually store the pointer into the global variable, spotted by Eli.
...
llvm-svn: 91036
2009-12-10 01:58:33 +00:00
Anders Carlsson
a72ddd4609
Handle emitting static variables that have reference type.
...
llvm-svn: 91027
2009-12-10 01:05:11 +00:00
Anders Carlsson
364051c6a6
Separate generating code for static variables and global variables.
...
llvm-svn: 91026
2009-12-10 00:57:45 +00:00
Anders Carlsson
633c6f6f36
Move more decl related functions to CGDeclCXX.cpp
...
llvm-svn: 91012
2009-12-10 00:30:05 +00:00
Anders Carlsson
bc49cfed84
Add CGDeclCXX.cpp and move EmitCXXGlobalVarDeclInit there.
...
llvm-svn: 91006
2009-12-10 00:16:00 +00:00