summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/ItaniumCXXABI.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* de-tmpify clang.Benjamin Kramer2011-09-271-1/+1
| | | | llvm-svn: 140637
* Create a VTableContext class and start moving CodeGenVTables methods to itPeter Collingbourne2011-09-261-1/+1
| | | | llvm-svn: 140502
* Re-commit r139643.Eli Friedman2011-09-131-25/+14
| | | | | | Make clang use Acquire loads and Release stores where necessary. llvm-svn: 139650
* Revert r139643 while I look into it; it's breaking selfhost.Eli Friedman2011-09-131-14/+25
| | | | llvm-svn: 139648
* Make clang use Acquire loads and Release stores where necessary.Eli Friedman2011-09-131-25/+14
| | | | llvm-svn: 139643
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-1/+1
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* Remove some unnecessary single element array temporaries.Jay Foad2011-07-291-6/+3
| | | | llvm-svn: 136461
* Make CodeGen for array delete involving incomplete class work without ↵Eli Friedman2011-07-271-21/+1
| | | | | | crashing. Should fix regression on g++.dg/init/delete1.C. llvm-svn: 136241
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-8/+8
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-18/+18
| | | | llvm-svn: 135370
* Generalize Cleanup::Emit's "isForEH" parameter into a setJohn McCall2011-07-121-1/+1
| | | | | | of flags. No functionality change. llvm-svn: 134997
* Rename CGT::VerifyFuncTypeComplete to isFuncTypeConvertible sinceChris Lattner2011-07-101-1/+1
| | | | | | | | | | | | | | | | | | it is a predicate, not an action. Change the return type to be a bool, not the incomplete member. Enhace it to detect the recursive compilation case, allowing us to compile Eli's testcase on llvmdev: struct T { struct T (*p)(void); } t; into: %struct.T = type { {}* } @t = common global %struct.T zeroinitializer, align 8 llvm-svn: 134853
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-12/+15
| | | | llvm-svn: 134831
* Update to match mainline ConstantStruct::get API change. Also, use Chris Lattner2011-06-201-6/+3
| | | | | | | | | | | ConvertType on InitListExprs as they are being converted. This is needed for a forthcoming patch, and improves the IR generated anyway (see additional type names in testcases). This patch also converts a bunch of std::vector's in CGObjCMac to use C arrays. There are a ton more that should be converted as well. llvm-svn: 133413
* update for api change.Chris Lattner2011-06-181-3/+1
| | | | llvm-svn: 133365
* Perform an acquire memory barrier on the fast path of a thread-safeJohn McCall2011-06-171-11/+33
| | | | | | static initializer check, as required by the Itanium ABI. llvm-svn: 133250
* Automatic Reference Counting.John McCall2011-06-151-1/+34
| | | | | | | | | | 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-11/+3
| | | | llvm-svn: 132260
* Remove dead variable flagged by gcc's -Wunused-but-set-variable. NoNick Lewycky2011-05-021-1/+0
| | | | | | functionality change. llvm-svn: 130673
* When compiling with -fno-threadsafe-statics, guard variables for globals ↵Anders Carlsson2011-04-271-5/+13
| | | | | | with internal linkage don't have to be i64, i8 works just fine! llvm-svn: 130286
* IRgen/ARM: Fix a think-o in conversion-to-null for member function pointers, weDaniel Dunbar2011-04-191-5/+6
| | | | | | | | were computing the conversion as (ptr != 0 && non-virtual), when it should be (ptr != 0 || is-virtual). - Test to follow in LLVM test-suite. llvm-svn: 129830
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* After some discussion with Doug, we decided that it made a lot more senseJohn McCall2011-04-121-21/+14
| | | | | | | | | for __unknown_anytype resolution to destructively modify the AST. So that's what it does now, which significantly simplifies some of the implementation. Normal member calls work pretty cleanly now, and I added support for propagating unknown-ness through &. llvm-svn: 129331
* More __unknown_anytype work.John McCall2011-04-111-13/+22
| | | | llvm-svn: 129269
* Convert the PointerWidthInBytes variable in EmitMemberPointer() to CharUnitsKen Dyck2011-04-091-4/+4
| | | | | | to eliminate a divide-by-8. No change in functionality intended. llvm-svn: 129180
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-2/+1
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128538
* Use the "undergoes default argument promotion" bit on parameters toJohn McCall2011-03-091-2/+2
| | | | | | | | | | 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
* For consistency, use llvm::raw_ostream in the rest of the mangle api.Rafael Espindola2011-02-111-1/+3
| | | | llvm-svn: 125360
* More capturing of 'this': implicit member expressions. Getting thatJohn McCall2011-02-031-35/+6
| | | | | | | | | | | right for anonymous struct/union members led to me discovering some seemingly broken code in that area of Sema, which I fixed, partly by changing the representation of member pointer constants so that IndirectFieldDecls aren't expanded. This led to assorted cleanups with member pointers in CodeGen, and while I was doing that I saw some random other things to clean up. llvm-svn: 124785
* Amazing that there are still issues with the fields of anonymous struct/unions..Argyrios Kyrtzidis2011-01-311-5/+29
| | | | | | Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236. llvm-svn: 124575
* Do a proper recursive lookup when deciding whether a class's usualJohn McCall2011-01-271-55/+46
| | | | | | | | | deallocation function has a two-argument form. Store the result of this check in new[] and delete[] nodes. Fixes rdar://problem/8913519 llvm-svn: 124373
* Fix warnings found by gcc-4.6, from -Wunused-but-set-variable andJeffrey Yasskin2011-01-181-4/+3
| | | | | | -Wint-to-pointer-cast. llvm-svn: 123719
* Move name mangling support from CodeGen to AST. In thePeter Collingbourne2011-01-131-8/+2
| | | | | | | | | | | | | | process, perform a number of refactorings: - Move MiscNameMangler member functions to MangleContext - Remove GlobalDecl dependency from MangleContext - Make MangleContext abstract and move Itanium/Microsoft functionality to their own classes/files - Implement ASTContext::createMangleContext and have CodeGen use it No (intended) functionality change. llvm-svn: 123386
* Simplify code.Anders Carlsson2010-11-241-4/+2
| | | | llvm-svn: 120118
* 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
OpenPOWER on IntegriCloud