summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/Mangle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add support for generating (very basic) C++ destructors. These aren't called ↵Anders Carlsson2009-04-171-14/+56
| | | | | | by anything yet. llvm-svn: 69343
* Fix a crash bug when comparing overload quality of conversion operators with ↵Sebastian Redl2009-04-161-55/+56
| | | | | | | | | | | conversion constructors. Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself. Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere. Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression. And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness. llvm-svn: 69299
* Add support for mangling C++ constructors. Review appreciated (I'm looking ↵Anders Carlsson2009-04-151-10/+52
| | | | | | at you, Doug) llvm-svn: 69150
* Update to use hasAttr() instead of getAttr().Daniel Dunbar2009-04-131-1/+1
| | | | | | - No functionality change. llvm-svn: 68987
* Add support for mangling guard variables.Anders Carlsson2009-04-131-0/+19
| | | | llvm-svn: 68969
* Don't mangle variables that are at translation unit scope.Anders Carlsson2009-04-111-1/+2
| | | | llvm-svn: 68853
* Implement mangling of declarations inside functions.Anders Carlsson2009-04-021-2/+14
| | | | llvm-svn: 68321
* Mangle VarDecls correctly.Anders Carlsson2009-04-021-0/+10
| | | | llvm-svn: 68320
* Move the function decl mangling code out into its own function. No ↵Anders Carlsson2009-04-021-32/+36
| | | | | | functionality change. llvm-svn: 68319
* Fix a bug (that I thought I had fixed already) where mangling a prefix could ↵Anders Carlsson2009-04-011-2/+2
| | | | | | get us into an infinite loop llvm-svn: 68168
* Fix a mangling bug where functions with no arguments weren't getting the 'v' ↵Anders Carlsson2009-04-011-0/+5
| | | | | | parameter specifier. llvm-svn: 68162
* fix several problems with asm renaming, by pulling it into the mangling code:Chris Lattner2009-03-211-8/+17
| | | | | | | | 1. it wasn't applying to definitions, only declarations, e.g. int x __asm("foo") 2. multiple definitions were conflicting, they weren't getting merged. 3. the code was duplicated in several places. llvm-svn: 67442
* simplify CXXNameMangler::mangle, making it exit earlier for C functions.Chris Lattner2009-03-211-31/+32
| | | | | | This speeds up a testcase in 3810 by ~16%. llvm-svn: 67429
* Almost complete implementation of rvalue references. One bug, and a few ↵Sebastian Redl2009-03-161-3/+8
| | | | | | unclear areas. Maybe Doug can shed some light on some of the fixmes. llvm-svn: 67059
* Address Doug's comments wrt the mangler and fix Eli's test caseAnders Carlsson2009-03-101-20/+10
| | | | llvm-svn: 66549
* Make mangling work with anonymous tag types. Doug, please reviewAnders Carlsson2009-03-071-5/+19
| | | | llvm-svn: 66353
* Mangle Objective-C interfaces correctly (where correctly refers to what gcc ↵Anders Carlsson2009-03-071-0/+9
| | | | | | does) llvm-svn: 66349
* Create a new TypeNodes.def file that enumerates all of the types,Douglas Gregor2009-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... llvm-svn: 65591
* Improve merging of function declarations. Specifically:Douglas Gregor2009-02-241-1/+1
| | | | | | | | | | | | | | | | - When we are declaring a function in local scope, we can merge with a visible declaration from an outer scope if that declaration refers to an entity with linkage. This behavior now works in C++ and properly ignores entities without linkage. - Diagnose the use of "static" on a function declaration in local scope. - Diagnose the declaration of a static function after a non-static declaration of the same function. - Propagate the storage specifier to a function declaration from a prior declaration (PR3425) - Don't name-mangle "main" llvm-svn: 65360
* We must always mangle attribute overloadable functions; even if in aDaniel Dunbar2009-02-201-5/+5
| | | | | | | system header. - Prevents a codegen crash when anything used anything in tgmath! :) llvm-svn: 65200
* Address Chris's comments regarding C++ name mangling.Douglas Gregor2009-02-181-20/+28
| | | | llvm-svn: 64984
* Add mangling for variadic functions and conversion functionsDouglas Gregor2009-02-131-2/+8
| | | | llvm-svn: 64425
* Add basic support for C++ name mangling according to the Itanium C++Douglas Gregor2009-02-131-0/+516
ABI to the CodeGen library. Since C++ code-generation is so incomplete, we can't exercise much of this mangling code. However, a few smoke tests show that it's doing the same thing as GCC. When C++ codegen matures, we'll extend the ABI tester to verify name-mangling as well, and complete the implementation here. At this point, the major client of name mangling is in the uses of the new "overloadable" attribute in C, which allows overloading. Any "overloadable" function in C (or in an extern "C" block in C++) will be mangled the same way that the corresponding C++ function would be mangled. llvm-svn: 64413
OpenPOWER on IntegriCloud