summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/Mangle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't crash when mangling empty anonymous unions. We never actually *need*John McCall2010-08-051-1/+5
| | | | | | | these, but it's convenient to mangle them when deferring them (in the 99.99% case where it's not an anonymous union, of course). llvm-svn: 110381
* Mangle enum constant expressions. Fixes rdar://problem/8204122John McCall2010-07-241-0/+6
| | | | llvm-svn: 109315
* Fix mangling for static member variables of classes inside an extern "C"Eli Friedman2010-07-181-0/+4
| | | | | | | linkage specification. Not sure if this is the ideal fix, but I'm reasonably sure it's correct vs. gcc. llvm-svn: 108656
* After some discussion, the ABI list settled on a much more sensible manglingJohn McCall2010-07-151-6/+3
| | | | | | for string literals. llvm-svn: 108464
* Fix the mangling of template template arguments, which do not alwaysJohn McCall2010-07-141-3/+50
| | | | | | | | follow <name>; instead they follow <type>, which has <name> as a subset. Fixes PR7446. llvm-svn: 108326
* Remove a few mangling FIXMEs:John McCall2010-07-141-5/+0
| | | | | | | | - TSTs whose template is a template template parameter already work - we don't provide an imaginary type, so we can't mangle one - we don't need a generic FIXME for vendor type qualifiers llvm-svn: 108317
* Implement the standard mangling for array-subscript expressions, and implementJohn McCall2010-07-141-15/+180
| | | | | | | the current proposals from David Vandervoorde for new, delete, throw, typeid, imaginary literals, string literals, and null literals. llvm-svn: 108315
* Use isFunctionOrMethod for vars declared localllyFariborz Jahanian2010-06-301-1/+1
| | | | | | in method/blocks to decide not to mangle them. llvm-svn: 107309
* extern variable declared locally to objective-c++ methodFariborz Jahanian2010-06-301-1/+1
| | | | | | should not be mangled either. Fixes radar 8016412. llvm-svn: 107303
* Add function for mangling reference temporaries.Anders Carlsson2010-06-261-0/+9
| | | | llvm-svn: 106948
* Patch to correctly mangle block helper functionsFariborz Jahanian2010-06-241-4/+14
| | | | | | | when block literal is declared inside a ctor/dtor. Fixes radr 8096995. llvm-svn: 106700
* improve altivec vector bool/pixel support, patch by Anton YartsevChris Lattner2010-06-231-4/+12
| | | | | | with several tweaks by me. llvm-svn: 106619
* Add name mangling for address spaces. We use the vendor-extensionDouglas Gregor2010-06-141-0/+12
| | | | | | | mangling for types, where the <source-name> is ASxxx (xxx is the address-space number). llvm-svn: 105975
* Split DependentNameType into two types. DependentNameType represents theJohn McCall2010-06-111-14/+18
| | | | | | | | | | | | | | case of an elaborated-type-specifier like 'typename A<T>::foo', and DependentTemplateSpecializationType represents the case of an elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc representation of a DependentTST conveniently exactly matches that of an ElaboratedType wrapping a TST. Kill off the explicit rebuild methods for RebuildInCurrentInstantiation; the standard implementations work fine because the nested name specifier is computable in the newly-entered context. llvm-svn: 105801
* Correctly handle > 257 substitutions in a single mangling, and don't introduceJohn McCall2010-06-091-10/+8
| | | | | | | a spurious substitution for an unscoped dependent template-id after introducing a substitution for the scoped template-id. llvm-svn: 105699
* Correctly mangle static variables of anonymous struct/union type.Anders Carlsson2010-06-081-0/+44
| | | | llvm-svn: 105606
* Don't substitute 'St' for 'std' when the namespace is nested inside another ↵Anders Carlsson2010-06-021-9/+9
| | | | | | namespace. llvm-svn: 105330
* Correctly mangle unsigned integer literals where the high bit is set.Anders Carlsson2010-06-021-2/+4
| | | | llvm-svn: 105312
* Correctly mangle variadic functions that don't have any other parameters.Anders Carlsson2010-06-021-1/+2
| | | | llvm-svn: 105311
* When mangling member function pointers, fake adding a substitution ↵Anders Carlsson2010-06-021-6/+25
| | | | | | corresponding to the function type. llvm-svn: 105310
* Extract the ObjC and blocks manglers into their own class. No functionalityCharles Davis2010-05-261-41/+58
| | | | | | change. llvm-svn: 104715
* Be sure to use the standard substitutions when mangling the names ofDouglas Gregor2010-05-261-5/+11
| | | | | | vtables, VTTs, and construction vtables. Fixes PR7201. llvm-svn: 104675
* Improve name mangling for blocks and support mangling of static localDouglas Gregor2010-05-251-1/+43
| | | | | | | | | variables within blocks. We loosely follow GCC's mangling, but since these are always internal symbols the names don't really matter. I intend to revisit block mangling later, because GCC's mangling is rather verbose. <rdar://problem/8015719>. llvm-svn: 104610
* Modify this comment per Doug's suggestion: we don't need to mangle protocols.John McCall2010-05-151-2/+2
| | | | llvm-svn: 103875
* Substantially alter the design of the Objective C type AST by introducingJohn McCall2010-05-151-0/+6
| | | | | | | | | | | | | | | | | | | | | ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. llvm-svn: 103870
* Reapplying patch to change StmtNodes.def to StmtNodes.td, this timeAlexis Hunt2010-05-051-1/+1
| | | | | | | with no whitespace. This will allow statements to be referred to in attribute TableGen files. llvm-svn: 103087
* Revert r103072; I accidentally ended up deleting a bunch of trailingAlexis Hunt2010-05-051-24/+24
| | | | | | | whitespace which makes this patch unreadable. Will recommit without the whitespace. llvm-svn: 103086
* Change StmtNodes.def to StmtNodes.td in anticipation of a rewrite of attributesAlexis Hunt2010-05-051-24/+24
| | | | llvm-svn: 103072
* Improve name mangling for dependent template names (e.g., typenameDouglas Gregor2010-04-281-15/+77
| | | | | | | | T::template apply<U>), handling a few cases where we previously failed and performing substitutions on such dependent names. Fixes a crash in Boost.PropertyTree. llvm-svn: 102490
* Make the InjectedClassNameType the canonical type of the current instantiationJohn McCall2010-04-271-0/+7
| | | | | | | | | | | | | | | | of a class template or class template partial specialization. That is to say, in template <class T> class A { ... }; or template <class T> class B<const T*> { ... }; make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType when written inside the appropriate context. This allows us to track the current instantiation appropriately even inside AST routines. It also allows us to compute a DeclContext for a type much more efficiently, at some extra cost every time we write a template specialization (which can be optimized, but I've left it simple in this patch). llvm-svn: 102407
* Emit a lame diagnostic when we can't mangle operator namesDouglas Gregor2010-04-231-1/+5
| | | | llvm-svn: 102168
* Mangle dependent template names such as the nested-name-specifier inDouglas Gregor2010-04-231-6/+53
| | | | | | | | | T::apply <U>::type Fixes PR6899, although I want to dig a little deeper into the FIXME for dependent template names that refer to operators. llvm-svn: 102167
* Fixes a code gen. bug by removing an assert.Fariborz Jahanian2010-04-201-2/+0
| | | | | | | It is ok to have c++-ness inside extern "C" block. Fixes pr6644. llvm-svn: 101948
* Vtable -> VTable renames across the board.Anders Carlsson2010-04-171-2/+2
| | | | llvm-svn: 101666
* Add raw_ostream operators to NamedDecl for convenience. Switch over all ↵Benjamin Kramer2010-04-171-1/+1
| | | | | | | | users of getNameAsString on a stream. The next step is to print the name directly into the stream, avoiding a temporary std::string copy. llvm-svn: 101632
* A bunch of string-related microoptimizations in Mangler.Benjamin Kramer2010-04-101-22/+22
| | | | llvm-svn: 100928
* Doug pointed out that we have a perfectly reasonable expression here toJohn McCall2010-04-101-2/+4
| | | | | | serve as a source of source locations for the can't-yet-mangle diagnostic. llvm-svn: 100924
* Mangle some expressions with codegen implications but no mangling "overhead".John McCall2010-04-091-0/+12
| | | | llvm-svn: 100909
* Provide an extremely unsatisfactory diagnostic (instead of crashing) whenJohn McCall2010-04-091-1/+15
| | | | | | | mangling an unknown expression kind. Also conveniently tells the user what kind of expression they should add to the mangler! llvm-svn: 100907
* Provide manglings for bool and character literal expressions. These areJohn McCall2010-04-091-0/+13
| | | | | | | | just integer-literal expressions with special case implementations in the AST. Fixes rdar://problem/7825453. llvm-svn: 100905
* Rename CGVtable files to CGVTables.Anders Carlsson2010-04-081-1/+1
| | | | llvm-svn: 100778
* Extend DependentNameType with a keyword enum that specifies whetherDouglas Gregor2010-03-311-2/+3
| | | | | | | this was parsed as a typename-specifier, elaborated-type-specifier (including the kind), or just a dependent qualified type name. llvm-svn: 100039
* Rename TypenameType to DependentNameType in anticipation of someDouglas Gregor2010-03-311-2/+2
| | | | | | refactoring work in this area. llvm-svn: 100019
* Remove the old vtable layout code.Anders Carlsson2010-03-301-53/+0
| | | | llvm-svn: 99869
* Implement new mangling for vectors.Nick Lewycky2010-03-261-2/+7
| | | | llvm-svn: 99616
* More thunks scaffolding.Anders Carlsson2010-03-231-4/+55
| | | | llvm-svn: 99294
* Correctly mangle dependent TypenameType.Rafael Espindola2010-03-171-24/+21
| | | | | | Fixes PR6625. llvm-svn: 98707
* Use SmallString instead of SmallVectorKovarththanan Rajaratnam2010-03-131-52/+52
| | | | llvm-svn: 98436
* Correctly mangle address of member in template arguments. Fixes PR6460Rafael Espindola2010-03-111-20/+49
| | | | llvm-svn: 98254
* Don't turn off mangling in implicitly extern "C" system headers. GCCDouglas Gregor2010-03-071-6/+0
| | | | | | | | | doesn't do this on any of the major platforms, and we don't really support any of the platforms that do (nor will we actually handle those headers well). Fixes PR6217; see PR6530 for details on what we would need to do to support these platforms. llvm-svn: 97899
OpenPOWER on IntegriCloud