summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/MicrosoftCXXABI.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup some clang code to use new type functions instead of using cast<>.Micah Villmow2012-10-251-2/+2
| | | | llvm-svn: 166684
* PR13684: Emit vtable entries for deleted functions as __cxa_deleted_function.David Blaikie2012-10-161-0/+3
| | | | | | | | This is consistent/interoperable with GCC 4.7 (& __cxa_deleted_function isn't present in 4.4 - not sure when it got added, but you'll need something with that function available for this to work). llvm-svn: 166069
* When performing a ::delete of an object with a virtual destructor,John McCall2012-09-251-0/+11
| | | | | | | | | | | | | | be sure to delete the complete object pointer, not the original pointer. This is necessary if the base being deleted is at a non-zero offset in the complete object. This is only required for objects with virtual destructors because deleting an object via a base-class subobject when the base does not have a virtual destructor is undefined behavior. Noticed while reviewing the last four years of cxx-abi-dev activity. llvm-svn: 164597
* In the MS ABI, ctors return 'this'. Patch by Dmitry Sokolov.John McCall2012-09-251-12/+35
| | | | llvm-svn: 164592
* [Windows] Abstract pure virtual method calls in the ABI. Fix the Windows ABI ↵Joao Matos2012-07-171-0/+2
| | | | | | to forward to the correct function. llvm-svn: 160373
* IRGen: Factor v-table generation into the CGCXXABI object.Charles Davis2012-06-231-0/+6
| | | | llvm-svn: 159091
* Abstract the emission of global destructors into ABI-specific codeJohn McCall2012-05-011-0/+16
| | | | | | | | | | | | | and only consider using __cxa_atexit in the Itanium logic. The default logic is to use atexit(). Emit "guarded" initializers in Microsoft mode unconditionally. This is definitely not correct, but it's closer to correct than just not emitting the initializer. Based on a patch by Timur Iskhodzhanov! llvm-svn: 155894
* Refactor the C++ ABI code a little bit to take advantage ofJohn McCall2012-05-011-7/+67
| | | | | | | | what I'm going to treat as basically universal properties of array-cookie code. Implement MS array cookies on top of that. Based on a patch by Timur Iskhodzhanov! llvm-svn: 155886
* ErrorUnsupported on array cookies in the MS C++ ABI code;John McCall2012-04-041-0/+7
| | | | | | patch by Timur Iskhodzhanov. llvm-svn: 153990
* 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
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* Notes on dynamic array cookies in MSVC.John McCall2011-01-271-0/+23
| | | | | | My thanks to chapuni for his help in investigating this. llvm-svn: 124351
* Move name mangling support from CodeGen to AST. In thePeter Collingbourne2011-01-131-1157/+1
| | | | | | | | | | | | | | 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
* The -fshort-wchar option causes wchar_t to become unsigned, in addition to beingChris Lattner2010-12-251-1/+2
| | | | | | | 16-bits in size. Implement this by splitting WChar into two enums, like we have for char. This fixes a miscompmilation of XULRunner, PR8856. llvm-svn: 122558
* Introduce a new type, PackExpansionType, to capture types that areDouglas Gregor2010-12-201-0/+4
| | | | | | | | | | | | | | | | | | | | pack expansions, e.g. given template<typename... Types> struct tuple; template<typename... Types> struct tuple_of_refs { typedef tuple<Types&...> types; }; the type of the "types" typedef is a PackExpansionType whose pattern is Types&. This commit introduces support for creating pack expansions for template type arguments, as above, but not for any other kind of pack expansion, nor for any form of instantiation. llvm-svn: 122223
* Use the right calling convention when mangling names in the Microsoft C++Charles Davis2010-11-091-4/+8
| | | | | | | | mangler. Now member functions and pointers thereof have their calling convention mangled as __thiscall if they have the default CC (even though, they technically still have the __cdecl CC). llvm-svn: 118598
* Implement ARM static local initialization guards, which are more compact thanJohn McCall2010-09-081-6/+0
| | | | | | Itanium guards and use a slightly different compiled-in API. llvm-svn: 113330
* Add symantic support for the Pascal calling convention viaDawn Perchik2010-09-031-0/+1
| | | | | | | "__attribute((pascal))" or "__pascal" (and "_pascal" under -fborland-extensions). Support still needs to be added to llvm. llvm-svn: 112939
* Teach IR generation to return 'this' from constructors and destructorsJohn McCall2010-08-311-0/+28
| | | | | | under the ARM ABI. llvm-svn: 112588
* Experiment with using first-class aggregates to represent member functionJohn McCall2010-08-221-1/+1
| | | | | | | | | | 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
* zap dead code.Chris Lattner2010-08-181-2/+0
| | | | llvm-svn: 111365
* 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
* Mangle Objective-C pointers and block pointers in the Microsoft C++ Mangler.Charles Davis2010-07-031-13/+22
| | | | | | | | | | ObjC pointers were easy enough (as far as the ABI is concerned, they're just pointers to structs), but I had to invent a new mangling for block pointers. This is particularly worrying with the Microsoft ABI, because it is a vendor-specific ABI; extending it could come back to bite us later when MS extends it on their own (and you know they will). llvm-svn: 107572
* Fix mangling of array dimensions in the Microsoft C++ Mangler.Charles Davis2010-07-031-7/+7
| | | | llvm-svn: 107568
* Mangle member pointer types in the Microsoft C++ Mangler.Charles Davis2010-07-031-3/+15
| | | | llvm-svn: 107567
* Fix mangling of function pointers in the Microsoft C++ Mangler.Charles Davis2010-07-031-0/+5
| | | | llvm-svn: 107564
* Fix mangling of array parameters for functions in the Microsoft C++ Mangler.Charles Davis2010-07-031-10/+21
| | | | | | | | | | | Only actual functions get mangled correctly; I don't know how to fix it for function pointers yet. Thanks to John McCall for the hint. Also, mangle anonymous tag types. I don't have a suitable testcase yet; I have a feeling that that's going to need support for static locals, and I haven't figured out exactly how MSVC's scheme for mangling those works. llvm-svn: 107561
* Mangle arrays in the Microsoft C++ Mangler. It's not quite finished (itCharles Davis2010-06-301-27/+157
| | | | | | | | | doesn't mangle array parameters right), but I think that should be fixed in Sema (Doug, John, what do you think?). Also, stub out the remaining mangleType() routines. llvm-svn: 107264
* Mangle pointer and (lvalue) reference types in the Microsoft C++ Mangler.Charles Davis2010-06-261-45/+88
| | | | | | | Also, fix mangling of throw specs. Turns out MSVC totally ignores throw specs when mangling names. llvm-svn: 106937
* Patch to correctly mangle block helper functionsFariborz Jahanian2010-06-241-1/+1
| | | | | | | when block literal is declared inside a ctor/dtor. Fixes radr 8096995. llvm-svn: 106700
* Mangle tag types (unions, structs, classes, enums) in the Microsoft C++ Mangler.Charles Davis2010-06-181-0/+63
| | | | | | | Also, test that static members with default visibility in a struct have the right mangling. llvm-svn: 106276
* Mangle operator names in the Microsoft C++ Mangler.Charles Davis2010-06-171-1/+131
| | | | llvm-svn: 106211
* Start mangling function types in the Microsoft C++ Mangler.Charles Davis2010-06-161-4/+201
| | | | llvm-svn: 106081
* Microsoft C++ Mangler:Charles Davis2010-06-141-1/+116
| | | | | | | | - Mangle qualifiers. - Start mangling variables' types into the name. A variable declared with a builtin type should now mangle properly. llvm-svn: 105931
* Microsoft C++ Mangler:Charles Davis2010-06-121-1/+110
| | | | | | | - Don't mangle static variables at global scope. - Add support for mangling builtin types. This will be used later. llvm-svn: 105881
* When mangling for the Microsoft C++ ABI, mangle variables in the globalCharles Davis2010-06-111-0/+41
| | | | | | namespace, too. llvm-svn: 105809
* Start implementing the Microsoft-style name mangler. Mangle simple namesCharles Davis2010-06-111-1/+197
| | | | | | | | | | | (but not their types; that's later). NOTE: Right now, variables in the global namespace don't get mangled, even though they're supposed to be. This is because the default mangler implements the shouldMangleDeclName() method that tells clang not to mangle them. This will be fixed in a later patch. llvm-svn: 105805
* Add an option to specify the target C++ ABI to the frontend. Use it toCharles Davis2010-06-111-1/+1
| | | | | | select either the default Itanium ABI or the new, experimental Microsoft ABI. llvm-svn: 105804
* Add a stub Microsoft Visual C++ ABI class (with stub mangler).Charles Davis2010-06-091-0/+130
llvm-svn: 105767
OpenPOWER on IntegriCloud