aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/Mangle.h
AgeCommit message (Collapse)Author
2011-01-13Move name mangling support from CodeGen to AST. In thePeter Collingbourne
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123386 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08Implement ARM static local initialization guards, which are more compact thanJohn McCall
Itanium guards and use a slightly different compiled-in API. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113330 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-26Add function for mangling reference temporaries.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106948 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-24Patch to correctly mangle block helper functionsFariborz Jahanian
when block literal is declared inside a ctor/dtor. Fixes radr 8096995. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106700 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-11When mangling for the Microsoft C++ ABI, mangle variables in the globalCharles Davis
namespace, too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-09Add a stub Microsoft Visual C++ ABI class (with stub mangler).Charles Davis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105767 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-31Make methods non-virtual again for now. I accidentally committed this inCharles Davis
preparation for an alternate mangler. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105224 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-31Silence GCC warning about an accessible non-virtual destructor in a class withChandler Carruth
virtual methods. Please review cdavis, should these methods even be virtual? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105218 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26Extract the ObjC and blocks manglers into their own class. No functionalityCharles Davis
change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104715 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25Improve name mangling for blocks and support mangling of static localDouglas Gregor
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>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104610 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17Vtable -> VTable renames across the board.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09Provide an extremely unsatisfactory diagnostic (instead of crashing) whenJohn McCall
mangling an unknown expression kind. Also conveniently tells the user what kind of expression they should add to the mangler! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100907 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30Remove the old vtable layout code.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99869 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24Change two class forward declarations to struct forward declarations, ↵Douglas Gregor
silencing a Clang warning git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99405 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23More thunks scaffolding.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99294 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19Change CodeGenModule to rely on the Module's symbol table instead ofJohn McCall
shadowing it in the GlobalDeclMap. Eliminates the string-uniquing requirement for mangled names, which should help C++ codegen times a little. Forces us to do string lookups instead of pointer lookups, which might hurt codegen times a little across the board. We'll see how it plays out. Removing the string-uniquing requirement implicitly fixes any bugs like PR6635 which arose from the fact that we had multiple uniquing tables for different kinds of identifiers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99012 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04Refactor local class name mangling and make itFariborz Jahanian
ABI conforming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03Work-in-progress: teach mangler how to mangle thunks for destructors.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90360 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02Change rtti/Rtti to RTTI, as it is an acronym.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90334 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26Add a CovariantThunkAdjustment struct that represents the adjustments needed ↵Anders Carlsson
for a covariant thunk. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89933 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26Move the mangler into the CodeGen namespace. Change mangleThunk to take a ↵Anders Carlsson
ThunkAdjustment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89930 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26Add a ThunkAdjustment struct which holds a non-virtual and a virtual ↵Anders Carlsson
adjustment offset. Start using it. General cleanup in Mangle.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89925 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Mangler: Lift shouldMangleDeclName predicate out of CXXNameMangler::mangle.Daniel Dunbar
- Sometimes we have to mangle things we wouldn't normally (e.g., because they appear in a template expression). - This also tidies up the predicate to be more obvious what is getting mangled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,Daniel Dunbar
instead of requiring clients to make a raw_svector_ostream, which is just an implementation detail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89548 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-21Sink free mangle* methods into MangleContext.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89547 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14Mangling support for typeinfo names.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88726 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10Add mangling for the construction vtable.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86643 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30Fix thinko, mangleCXXRtti should obviously take a QualType!Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85565 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30mangleCXXRtti obviously needs to take a type, what was I thinking...Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28Add mangling for VTTs.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11Change mangleCXXVtable and mangleCXXRtti to take CXXRecordDecls instead of ↵Anders Carlsson
QualTypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83793 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-07Mangle anonymous structs/unions correctly. Fixes PR5139.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-07Add a MangleContext and pass it to all mangle functions. It will be used for ↵Anders Carlsson
keeping state, such as identifiers assigned to anonymous structs as well as scope encoding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83442 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11Add basic covariant thunk generation support. WIP.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07Refine vcall offsets. Cleanups. WIP.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81143 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-05Install thunks later to fixup overrides. Track space taken by vbaseMike Stump
offsets better for thunk refinements. Cleanups. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81067 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02Add mangling for covariant thunks.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80747 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02Shorten name.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80744 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-02Add mangling for thunks.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80743 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31Add beginnigs of rtti generation, wire up more of -fno-exceptions.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77751 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31Add code to setup the vtable pointer in the constructor. Work in progress.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17Add support for generating (very basic) C++ destructors. These aren't called ↵Anders Carlsson
by anything yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69343 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15Add support for mangling C++ constructors. Review appreciated (I'm looking ↵Anders Carlsson
at you, Doug) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69150 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Add support for mangling guard variables.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68969 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-21fix several problems with asm renaming, by pulling it into the mangling code:Chris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67442 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18Address Chris's comments regarding C++ name mangling.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64984 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13Add basic support for C++ name mangling according to the Itanium C++Douglas Gregor
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64413 91177308-0d34-0410-b5e6-96231b3b80d8