summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* one piece of code is responsible for the lifetime of every aggregateJohn McCall2010-09-151-1/+1
| | | | | | | | | | | | | 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 llvm-svn: 113962
* Implement ARM static local initialization guards, which are more compact thanJohn McCall2010-09-081-137/+7
| | | | | | Itanium guards and use a slightly different compiled-in API. llvm-svn: 113330
* Teach IR generation to return 'this' from constructors and destructorsJohn McCall2010-08-311-1/+2
| | | | | | under the ARM ABI. llvm-svn: 112588
* IRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument andDaniel Dunbar2010-08-211-4/+6
| | | | | | | | 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. llvm-svn: 111707
* When initializing a static local, pop the guard-abort EH cleanup afterJohn McCall2010-08-101-0/+4
| | | | | | the variable is fully initialized. llvm-svn: 110704
* Emit global destructors even if the destroyed object has no initializers or hasJohn McCall2010-07-301-7/+3
| | | | | | | | an initializer requiring temporary object disposal. Fixes rdar:://problem/8246444. llvm-svn: 109849
* Rename LazyCleanup -> Cleanup. No functionality change for these last threeJohn McCall2010-07-211-2/+2
| | | | | | commits. llvm-svn: 109000
* Switch the __cxa_guard_abort cleanup to being a lazy cleanup.John McCall2010-07-211-5/+17
| | | | llvm-svn: 108993
* When deferring the emission of declarations with initializers in C++, rememberJohn McCall2010-07-151-5/+18
| | | | | | | 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
* When creating functions to run global initializers and destructors, mark themJohn McCall2010-07-061-0/+3
| | | | | | as nounwind in -fno-exceptions. Fixes rdar://problem/8090834. llvm-svn: 107639
* Validated by nightly-test runs on x86 and x86-64 darwin, including afterJohn McCall2010-07-061-58/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 107631
* Remove unnecessary ASTContext parameter fromDouglas Gregor2010-07-011-1/+1
| | | | | | CXXRecordDecl::getDestructor(); no functionality change. llvm-svn: 107394
* Correctly destroy reference temporaries with global storage. Remove ↵Anders Carlsson2010-06-271-12/+4
| | | | | | ErrorUnsupported call when binding a global reference to a non-lvalue. Fixes PR7326. llvm-svn: 106983
* finally get around to doing a significant cleanup to irgen:Chris Lattner2010-06-271-1/+0
| | | | | | | | 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. llvm-svn: 106977
* tidy up OrderGlobalInitsChris Lattner2010-06-271-1/+1
| | | | llvm-svn: 106976
* Change EmitReferenceBindingToExpr to take a decl instead of a boolean.Anders Carlsson2010-06-261-2/+3
| | | | llvm-svn: 106949
* Per Chris's comment, remove another static (this oneFariborz Jahanian2010-06-221-18/+1
| | | | | | is a static comparator operator). llvm-svn: 106511
* Avoid using a local static for providing lexicalFariborz Jahanian2010-06-211-3/+1
| | | | | | order of priorotized global object initializations. llvm-svn: 106503
* In supporting init-priority, globals with the same init_priority must beFariborz Jahanian2010-06-211-2/+22
| | | | | | emitted in the order in which they are seen (still radar 8076356). llvm-svn: 106485
* Use more efficient API of SmallVector/array_pod_sortFariborz Jahanian2010-06-211-3/+3
| | | | | | for sorting (radar 8076356). llvm-svn: 106453
* IRGen for implementation of init-priority attribute.Fariborz Jahanian2010-06-211-5/+25
| | | | | | | Test case will be checked in llvm test suite. (finishes off radar 8076356). llvm-svn: 106441
* Fix PR7097, a bad interaction between -fno-use-cxa-atexit andChris Lattner2010-06-191-7/+2
| | | | | | -mconstructor-aliases by using a WeakVH instead of a raw pointer. llvm-svn: 106384
* Move CodeGenOptions.h *back* into Frontend. This should have been done when theChandler Carruth2010-06-151-1/+1
| | | | | | dependency edge was reversed such that CodeGen depends on Frontend. llvm-svn: 106065
* On Darwin, initialization and destruction functions should go into the ↵Anders Carlsson2010-06-081-0/+5
| | | | | | __StaticInit section. llvm-svn: 105650
* Add a global CreateGlobalInitOrDestructFunction and use it for creating ↵Anders Carlsson2010-06-081-11/+17
| | | | | | global init or destruction functions. llvm-svn: 105649
* Rename __tcf_ to __cxx_global_array_dtor. Remove the ↵Anders Carlsson2010-06-081-3/+2
| | | | | | UniqueAggreDestructorCount from CodeGenFunction and let LLVM handle uniquing the internal functions instead. llvm-svn: 105648
* Move GenerateCXXAggrDestructorHelper to CGDeclCXX.cpp where it belongs.Anders Carlsson2010-06-081-0/+37
| | | | llvm-svn: 105647
* Simplify GenerateCXXAggrDestructorHelper.Anders Carlsson2010-06-081-4/+3
| | | | llvm-svn: 105646
* When initializing thread-safe statics, put the call toDouglas Gregor2010-05-161-8/+64
| | | | | | | | | | | | | __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. llvm-svn: 103892
* Revert r103880 (thread-safe static initialization w/ exceptions),Douglas Gregor2010-05-161-26/+8
| | | | | | because it's causing strange linker errors. Unfixes PR7144. llvm-svn: 103890
* When initializing thread-safe statics, put the call toDouglas Gregor2010-05-151-8/+26
| | | | | | | | __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. llvm-svn: 103880
* For thread-safe static initialization of local statics withDouglas Gregor2010-05-051-33/+48
| | | | | | | | 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
* Emit the globals, metadata, etc. associated with static variables even whenJohn McCall2010-05-041-0/+3
| | | | | | | | 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
* emit dtors with the right calling convention in -fno-use-cxa-atexitChris Lattner2010-04-261-3/+8
| | | | | | mode. llvm-svn: 102377
* C++: Add support for -fno-use-cxa-atexit.Daniel Dunbar2010-03-201-16/+73
| | | | | | | | - So much typing, so little gain... Also, rename the __cxx_global_initialization function just to match llvm-gcc. llvm-svn: 99039
* IRgen: Inline GenerateCXXGlobal[VarDecl]InitFunc into sole caller.Daniel Dunbar2010-03-201-30/+15
| | | | llvm-svn: 99038
* Add support for threadsafe statics, and make them the default (matching gcc).Anders Carlsson2010-02-061-22/+85
| | | | | | Daniel, I'd appreciate a review of the driver/cc1 parts. llvm-svn: 95508
* Revert the new reference binding code; I came up with a way simpler solution ↵Anders Carlsson2010-02-031-2/+2
| | | | | | for the reference binding bug that is preventing self-hosting. llvm-svn: 95223
* global variable that binds reference to a non-lvalue reprotedFariborz Jahanian2010-01-251-2/+7
| | | | | | as NYI now. llvm-svn: 94453
* Fix a code gen. bug involving compiling global references.Fariborz Jahanian2010-01-251-2/+2
| | | | | | (fixes radar 7574896). llvm-svn: 94434
* Fix for PR5967: Make const-marking for LLVM globals correct for cases requiringEli Friedman2010-01-081-6/+30
| | | | | | | run-time initialization, and emit run-time initializers aggresively to avoid ordering issues with deferred globals. llvm-svn: 92976
* Actually store the pointer into the global variable, spotted by Eli.Anders Carlsson2009-12-101-2/+5
| | | | llvm-svn: 91036
* Handle emitting static variables that have reference type.Anders Carlsson2009-12-101-1/+4
| | | | llvm-svn: 91027
* Separate generating code for static variables and global variables.Anders Carlsson2009-12-101-33/+59
| | | | llvm-svn: 91026
* Move more decl related functions to CGDeclCXX.cppAnders Carlsson2009-12-101-0/+117
| | | | llvm-svn: 91012
* Add CGDeclCXX.cpp and move EmitCXXGlobalVarDeclInit there.Anders Carlsson2009-12-101-0/+62
llvm-svn: 91006
OpenPOWER on IntegriCloud