summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/ItaniumCXXABI.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Simplify the logic for emitting guard variables for template staticJohn McCall2010-11-061-14/+12
| | | | | | | | | 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
* Ensure that static local variables in function templates inherit theJohn McCall2010-11-021-0/+4
| | | | | | visibility of their function. llvm-svn: 118065
* Patch to provide guard when initializing instancesFariborz Jahanian2010-10-261-1/+6
| | | | | | | of static data member of a class template. Fixes //rdar :// 8562966 and pr8409. llvm-svn: 117410
* Implement ARM static local initialization guards, which are more compact thanJohn McCall2010-09-081-0/+159
| | | | | | Itanium guards and use a slightly different compiled-in API. llvm-svn: 113330
* Revert my two IRgen fixes for "bool", then use a far simpler approachDouglas Gregor2010-09-021-7/+2
| | | | | | | based on ConvertTypeForMem. Thanks to John for pointing out the right solution. llvm-svn: 112838
* Fix a crash involving pointer-to-data-members of boolean type. We wereDouglas Gregor2010-09-021-2/+7
| | | | | | | | | | | | constructing an LLVM PointerType directly from the "bool"'s LLVM type (i1), which resulted in unfortunate pointer type i1*. The fix is to build the LLVM PointerType from the corresponding Clang PointerType, so that we get i8* in the case of a bool. John, please review. I also left a FIXME there because we seem to be dropping "volatile", which would be rather unfortunate. llvm-svn: 112819
* Simplify some random accesses to the ASTContext from the ABI classes.John McCall2010-09-021-17/+17
| | | | llvm-svn: 112816
* Abstract IR generation of array cookies into the C++ ABI class andJohn McCall2010-09-021-0/+244
| | | | | | | | | | | | | | implement ARM array cookies. Also fix a few unfortunate bugs: - throwing dtors in deletes prevented the allocation from being deleted - adding the cookie to the new[] size was not being considered for overflow (and, more seriously, was screwing up the earlier checks) - deleting an array via a pointer to array of class type was not causing any destructors to be run and was passing the unadjusted pointer to the deallocator - lots of address-space problems, in case anyone wants to support free store in a variant address space :) llvm-svn: 112814
* Amusingly, I missed this point of abstraction in all my earlierJohn McCall2010-08-311-0/+30
| | | | | | member-pointer refactoring: dereferencing a member data pointer. llvm-svn: 112640
* Teach IR generation to return 'this' from constructors and destructorsJohn McCall2010-08-311-0/+161
| | | | | | under the ARM ABI. llvm-svn: 112588
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-4/+4
| | | | | | to the new constants. llvm-svn: 112047
* chandlerc pointed out that ending a line with /\ is not very friendly. :)John McCall2010-08-231-4/+4
| | | | llvm-svn: 111797
* Abstract out everything having to do with member pointers into the ABIJohn McCall2010-08-231-64/+186
| | | | | | | | | | | class; they should just be completely opaque throughout IR gen now, although I haven't really audited that. Fix a bug apparently inherited from gcc-4.2 where we failed to null-check member data pointers when performing derived-to-base or base-to-derived conversions on them. llvm-svn: 111789
* Go back to asking CodeGenTypes whether a type is zero-initializable.John McCall2010-08-221-8/+5
| | | | | | | | | Make CGT defer to the ABI on all member pointer types. This requires giving CGT a handle to the ABI. It's way easier to make that work if we avoid lazily creating the ABI. Make it so. llvm-svn: 111786
* Clean up a very silly use of first-class aggregates.John McCall2010-08-221-8/+2
| | | | llvm-svn: 111777
* Experiment with using first-class aggregates to represent member functionJohn McCall2010-08-221-155/+103
| | | | | | | | | | pointers. I find the resulting code to be substantially cleaner, and it makes it very easy to use the same APIs for data member pointers (which I have conscientiously avoided here), and it avoids a plethora of potential inefficiencies due to excessive memory copying, but we'll have to see if it actually works. llvm-svn: 111776
* Extract member function pointer comparison and null comparison intoJohn McCall2010-08-221-0/+112
| | | | | | | | | | | | the ABI code. Implement correct semantics for these on ARM. I believe this completes the implementation of member function pointers on ARM. I think I'm going to switch member function pointers over to be non-aggregates while I have all this in mind. llvm-svn: 111774
* Abstract out member-pointer creation. I'm really unhappy about the currentJohn McCall2010-08-221-0/+106
| | | | | | | | duplication between the constant and non-constant paths in all of this. Implement ARM ABI semantics for member pointer constants and conversion. llvm-svn: 111772
* Abstract more member-pointerness out.John McCall2010-08-221-10/+92
| | | | llvm-svn: 111771
* Abstract out member-pointer conversions.John McCall2010-08-221-0/+57
| | | | | | Pretty much everything having to do with member pointers is ABI-specific. llvm-svn: 111770
* Implement the call parts of the member-function-pointer ARM C++ ABI.John McCall2010-08-221-23/+56
| | | | llvm-svn: 111766
* Extract calls to method pointers out as an ABI routine.John McCall2010-08-221-1/+86
| | | | | | No functionality change. llvm-svn: 111752
* The ARM C++ ABI is sufficiently different from the Itanium C++ ABI thatJohn McCall2010-08-211-0/+13
| | | | | | | it deserves its own enumerator. Obviously the implementations should closely follow the Itanium ABI except in cases of divergence. llvm-svn: 111749
* Implement support for member pointers under the Microsoft C++ ABI in theCharles Davis2010-08-161-2/+2
| | | | | | | | AST library. This also adds infrastructure for supporting multiple C++ ABIs in the AST. llvm-svn: 111117
* IRgen: Add a stub class for generating ABI-specific C++ code.Charles Davis2010-05-251-0/+39
This class only supports name mangling (which is apparently used during C/ObjC codegen). For now only the Itanium C++ ABI is supported. Patches to add a second C++ ABI are forthcoming. llvm-svn: 104630
OpenPOWER on IntegriCloud