summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-2/+2
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-6/+6
| | | | llvm-svn: 135370
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-1/+1
| | | | llvm-svn: 135265
* Generalize the routine for destroying an object with staticJohn McCall2011-07-131-45/+51
| | | | | | | storage duration, then explicitly exempt ownership-qualified types from it. llvm-svn: 135028
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-3/+4
| | | | llvm-svn: 134831
* Emit guard variables for any weak global that has a run-timeDouglas Gregor2011-07-011-6/+5
| | | | | | | initializer. Previously, we only used guard variables for weak static data members. Fixes <rdar://problem/9692249>. llvm-svn: 134266
* Restore correct use of GC barriers.John McCall2011-06-161-17/+14
| | | | llvm-svn: 133144
* Automatic Reference Counting.John McCall2011-06-151-7/+20
| | | | | | | | | | 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. llvm-svn: 133103
* Eliminate temporary argument vectors.Benjamin Kramer2011-05-281-8/+2
| | | | llvm-svn: 132260
* Reset the emitted initializers.Axel Naumann2011-05-061-0/+2
| | | | | | This enables incremental codegen, where the initializer array can be removed from the module, such that only new initializers will be emitted and run. llvm-svn: 130986
* Template static data members can have weak_odr linkage, not justJohn McCall2011-04-121-2/+5
| | | | | | | | 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. llvm-svn: 129342
* __cxa_atexit does not throw.Anders Carlsson2011-03-201-0/+2
| | | | llvm-svn: 127977
* The Darwin kernel does not provide useful guard variable support.John McCall2011-03-181-0/+8
| | | | | | | | 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. llvm-svn: 127854
* Use the "undergoes default argument promotion" bit on parameters toJohn McCall2011-03-091-14/+15
| | | | | | | | | | 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. llvm-svn: 127314
* Revert "Add CC_Win64ThisCall and set it in the necessary places."Tilmann Scheller2011-03-021-7/+4
| | | | | | This reverts commit 126863. llvm-svn: 126886
* Add CC_Win64ThisCall and set it in the necessary places.Tilmann Scheller2011-03-021-4/+7
| | | | llvm-svn: 126863
* Get rid of the areExceptionsEnabled() getter from LangOptions.Anders Carlsson2011-02-281-1/+1
| | | | llvm-svn: 126598
* Add a LangOptions::areExceptionsEnabled and start using it.Anders Carlsson2011-02-201-1/+1
| | | | llvm-svn: 126062
* In -fapple-kext mode, global object construction code Fariborz Jahanian2011-02-151-5/+6
| | | | | | ends up in the text segment. // rdar://8825235. llvm-svn: 125585
* Reorganize CodeGen{Function,Module} to eliminate the unfortunateJohn McCall2011-02-081-4/+2
| | | | | | | | Block{Function,Module} base class. Minor other refactorings. Fixed a few address-space bugs while I was there. llvm-svn: 125085
* Save getObjCGCAttrKind and use it in two placesFariborz Jahanian2011-01-131-2/+3
| | | | | | | for efficiancy (still part of //rdar://8761767). Per John's comment. llvm-svn: 123401
* Generate write-barriers for global objcFariborz Jahanian2011-01-131-1/+9
| | | | | | assigns. // rdar://8761767 llvm-svn: 123391
* Simplify the logic for emitting guard variables for template staticJohn McCall2010-11-061-20/+15
| | | | | | | | | 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. llvm-svn: 118336
* Do the guarding of instantiated static data membersFariborz Jahanian2010-10-271-4/+9
| | | | | | | | on if its linkage is weak. Currently this is the case but may change in the future. (part of radar 8562966). llvm-svn: 117452
* Patch to provide guard when initializing instancesFariborz Jahanian2010-10-261-1/+9
| | | | | | | of static data member of a class template. Fixes //rdar :// 8562966 and pr8409. llvm-svn: 117410
* 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
OpenPOWER on IntegriCloud