summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/Mangle.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add new functions to the mangler for the <unscoped-name> and ↵Anders Carlsson2009-09-171-8/+25
| | | | | | <unscoped-template-name> productions. llvm-svn: 82113
* Add basic substitution to the C++ mangler. It currently only looks at types.Anders Carlsson2009-09-171-8/+72
| | | | llvm-svn: 82102
* We can't have ctors in the vtable (right Doug?) :-)Mike Stump2009-09-121-4/+0
| | | | llvm-svn: 81619
* Remove unnecessary ASTContext parameters from isMain and isExternCDouglas Gregor2009-09-121-1/+1
| | | | llvm-svn: 81589
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-61/+60
| | | | llvm-svn: 81346
* Refine vcall offsets. Cleanups. WIP.Mike Stump2009-09-071-16/+17
| | | | llvm-svn: 81143
* Overhaul the mangler to use a visitor pattern, at least for types. We can ↵John McCall2009-09-051-96/+134
| | | | | | | | | | | safely ignore non-canonical type classes, but apparently we need to know how to mangle dependent names. The missing cases are much more obvious now. llvm-svn: 81070
* Install thunks later to fixup overrides. Track space taken by vbaseMike Stump2009-09-051-21/+16
| | | | | | offsets better for thunk refinements. Cleanups. WIP. llvm-svn: 81067
* Start emitting ElaboratedTypes in C++ mode. Support the effort in variousJohn McCall2009-09-051-0/+3
| | | | | | | | ways: remove elab types during desugaring, enhance pretty-printing to allow tags to be suppressed without suppressing scopes, look through elab types when associating a typedef name with an anonymous record type. llvm-svn: 81065
* Add mangling for covariant thunks.Mike Stump2009-09-021-6/+48
| | | | llvm-svn: 80747
* Shorten name.Mike Stump2009-09-021-7/+6
| | | | llvm-svn: 80744
* Add mangling for thunks.Mike Stump2009-09-021-22/+72
| | | | llvm-svn: 80743
* Disable all recognition of main() in -ffreestanding. Addresses bug #4720.John McCall2009-08-151-1/+1
| | | | llvm-svn: 79070
* Add beginnigs of rtti generation, wire up more of -fno-exceptions.Mike Stump2009-07-311-0/+15
| | | | llvm-svn: 77751
* Add code to setup the vtable pointer in the constructor. Work in progress.Mike Stump2009-07-311-4/+16
| | | | llvm-svn: 77699
* Fix a couple recent ABI regressions noticed during code review (fallout from ↵Steve Naroff2009-07-221-2/+2
| | | | | | | | the ObjC type system rewrite). It's unfortunate that the mangling includes the low-level structs. Nevertheless, we need this for binary compatibility with GCC. llvm-svn: 76755
* Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say ↵Steve Naroff2009-07-151-0/+2
| | | | | | | | | | | | pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective). This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-). This patch also adds Type::isObjCBuiltinType(). This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small. llvm-svn: 75808
* Basic support for C++0x unicode types. Support for literals will follow in ↵Alisdair Meredith2009-07-141-2/+4
| | | | | | an incremental patch llvm-svn: 75622
* This patch includes a conceptually simple, but very intrusive/pervasive change. Steve Naroff2009-07-101-0/+5
| | | | | | | | | | | | The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. llvm-svn: 75314
* Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis2009-06-301-2/+2
| | | | | | | | | The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
* Improve code generation for function template specializations:Douglas Gregor2009-06-291-1/+29
| | | | | | | | | | | | | | | | - Track implicit instantiations vs. the not-yet-supported explicit specializations - Give implicit instantiations of function templates (and member functions of class templates) linkonce_odr linkage. - Improve name mangling for function template specializations, including the template arguments of the instantiation and the return type of the function. Note that our name-mangling is improved, but not correct: we still don't mangle substitutions, although the manglings we produce can be demangled. llvm-svn: 74466
* Implement enough of the 'auto' keyword so we can claim to support N2546.Anders Carlsson2009-06-261-0/+3
| | | | llvm-svn: 74307
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-181-2/+2
| | | | llvm-svn: 73702
* Simplify mangleFunctionDecl by unnesting a crazy condition. This fixesChris Lattner2009-06-131-13/+14
| | | | | | | the check for extern "c" system headers, which should prevent functiondecls from being mangled. llvm-svn: 73311
* Don't try to call getFileCharacteristic if the function declaration has an ↵Anders Carlsson2009-05-311-2/+3
| | | | | | invalid source location (as is the case for the global allocation functions. llvm-svn: 72671
* Add support for converting member pointer types to LLVM types. Also mangle ↵Anders Carlsson2009-05-171-1/+6
| | | | | | pointer to member functions correctly and add tests. llvm-svn: 71981
* Reflow some comments.Mike Stump2009-05-161-2/+2
| | | | llvm-svn: 71937
* Name mangling for class template specializations and template arguments.Anders Carlsson2009-05-151-2/+64
| | | | llvm-svn: 71861
* Implement C++0x nullptr.Sebastian Redl2009-05-101-0/+3
| | | | llvm-svn: 71405
* assert that mangleName is not called for C++ ctors/dtors.Anders Carlsson2009-05-031-0/+5
| | | | llvm-svn: 70783
* initial support for __[u]int128_t, which should be basicallyChris Lattner2009-04-301-0/+2
| | | | | | | | compatible with VC++ and GCC. The codegen/mangling angle hasn't been fully ironed out yet. Note that we accept int128_t even in 32-bit mode, unlike gcc. llvm-svn: 70464
* 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
OpenPOWER on IntegriCloud