summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/Mangle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Refactor local class name mangling and make itFariborz Jahanian2010-03-041-13/+8
| | | | | | ABI conforming. llvm-svn: 97702
* Implements mangling of local class names toFariborz Jahanian2010-03-031-13/+58
| | | | | | | | fix a code gen crash. This is WIP as not all ABI cases are covered (there is a FIXME to this effect). Fixes radar 7696748. llvm-svn: 97658
* Split out types that are non-canonical unless dependent as their ownJohn McCall2010-03-011-1/+39
| | | | | | | | | | | category. Use this in a few places to eliminate unnecessary TST cases and do some future-proofing. Provide terrible manglings for typeof. Mangle decltype with some hope of accuracy. Our manglings for some of the cases covered in the testcase are different from gcc's, which I've raised as an issue with the ABI list. llvm-svn: 97523
* The latest draft uses 'dt' to mangle member expressions, and now so do we.John McCall2010-03-011-9/+3
| | | | llvm-svn: 97479
* Improve name mangling for dependently-scoped declaration references.Douglas Gregor2010-02-281-1/+12
| | | | llvm-svn: 97422
* Add name mangling for DeclRefExprs that refer to external namesDouglas Gregor2010-02-281-2/+8
| | | | llvm-svn: 97418
* Make previous fix handle a few more edge cases.Eli Friedman2010-02-231-3/+3
| | | | llvm-svn: 96962
* PR6400: Handle an extreme edge case in mangling correctly.Eli Friedman2010-02-231-0/+3
| | | | llvm-svn: 96961
* Only append 'L' for internal variable declarations, not all declarations. ↵Anders Carlsson2010-02-061-3/+4
| | | | | | (Found by the mangle checker, yay) llvm-svn: 95485
* Assert when we try to mangle a dependent template name, rather thanDouglas Gregor2010-02-061-1/+3
| | | | | | crashing unceremoniously. llvm-svn: 95464
* Implement name mangling for template template parametersDouglas Gregor2010-02-051-2/+15
| | | | llvm-svn: 95427
* Check in a mangle checker that's turned off by default.Anders Carlsson2010-02-051-0/+18
| | | | llvm-svn: 95377
* Mangle member expressions. Also invented.John McCall2010-02-041-1/+57
| | | | llvm-svn: 95284
* Add a cautionary note about the mangling I just invented.John McCall2010-02-041-0/+3
| | | | llvm-svn: 95275
* Add mangling support for calls, sizeof/alignof, constructor calls,John McCall2010-02-041-29/+151
| | | | | | float literals, and unresolved lookups (which required hand-wavey extensions). llvm-svn: 95273
* When a function or variable somehow depends on a type or declarationDouglas Gregor2010-02-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that is in an anonymous namespace, give that function or variable internal linkage. This change models an oddity of the C++ standard, where names declared in an anonymous namespace have external linkage but, because anonymous namespace are really "uniquely-named" namespaces, the names cannot be referenced from other translation units. That means that they have external linkage for semantic analysis, but the only sensible implementation for code generation is to give them internal linkage. We now model this notion via the UniqueExternalLinkage linkage type. There are several changes here: - Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage when the declaration is in an anonymous namespace. - Added Type::getLinkage() to determine the linkage of a type, which is defined as the minimum linkage of the types (when we're dealing with a compound type that is not a struct/class/union). - Extended NamedDecl::getLinkage() to consider the linkage of the template arguments and template parameters of function template specializations and class template specializations. - Taught code generation to rely on NamedDecl::getLinkage() when determining the linkage of variables and functions, also considering the linkage of the types of those variables and functions (C++ only). Map UniqueExternalLinkage to internal linkage, taking out the explicit checks for isInAnonymousNamespace(). This fixes much of PR5792, which, as discovered by Anders Carlsson, is actually the reason behind the pass-manager assertion that causes the majority of clang-on-clang regression test failures. With this fix, Clang-built-Clang+LLVM passes 88% of its regression tests (up from 67%). The specific numbers are: LLVM: Expected Passes : 4006 Expected Failures : 32 Unsupported Tests : 40 Unexpected Failures: 736 Clang: Expected Passes : 1903 Expected Failures : 14 Unexpected Failures: 75 Overall: Expected Passes : 5909 Expected Failures : 46 Unsupported Tests : 40 Unexpected Failures: 811 Still to do: - Improve testing - Check whether we should allow the presence of types with InternalLinkage (in addition to UniqueExternalLinkage) given variables/functions internal linkage in C++, as mentioned in PR5792. - Determine how expensive the getLinkage() calls are in practice; consider caching the result in NamedDecl. - Assess the feasibility of Chris's idea in comment #1 of PR5792. llvm-svn: 95216
* Remove abstract expression kinds from the StmtClass enum. Update a few usersJohn McCall2010-02-031-6/+23
| | | | | | appropriately. Call out a few missing cases in the expression mangler. llvm-svn: 95176
* Name mangling for cast expressions, from Matthias Schiffer! Fixes PR5876.Douglas Gregor2010-01-291-0/+18
| | | | llvm-svn: 94811
* Mangle static variables with an extra name to distinguish them from ↵Alexis Hunt2010-01-241-6/+11
| | | | | | | | non-static variables in the same TU. Fixes PR5966 for real this time; also reverts r92911, which had a incorrect fix. llvm-svn: 94352
* fix PR5869: mangle static symbols like gcc does to make it easier to diff ↵Nuno Lopes2010-01-071-1/+4
| | | | | | symbol tables llvm-svn: 92911
* Get rid of FixedWidthIntType, as suggested by Chris and Eli.Anders Carlsson2009-12-291-4/+0
| | | | llvm-svn: 92246
* Mangle block pointer types. Fixes PR5858.Anders Carlsson2009-12-231-1/+2
| | | | llvm-svn: 92069
* There is no such thing as typeinfo for a cv-qualified type. AssertDouglas Gregor2009-12-231-0/+1
| | | | | | | | that this is true when mangling, then fix up the various places in Sema and/or CodeGen that need to remove qualifiers. Addresses a linking issue when building LLVM with Clang. llvm-svn: 92064
* Mangle template template parameters. Fixes PR5861.Anders Carlsson2009-12-231-9/+12
| | | | llvm-svn: 92030
* Make sure that we mangle overloaded operators that are member functions ↵Anders Carlsson2009-12-221-7/+22
| | | | | | | | correctly, giving them the correct arity. With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being). llvm-svn: 91893
* Mangle CXXOperatorCallExprs, fixes PR5796.Anders Carlsson2009-12-161-0/+10
| | | | llvm-svn: 91507
* Mangle unary, binary and ternary expressions correctly.Anders Carlsson2009-12-141-18/+58
| | | | llvm-svn: 91257
* Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gaveJeffrey Yasskin2009-12-121-2/+2
| | | | | | no extra safety anyway. llvm-svn: 91207
* Make sure mangling doesn't crash in another case. Add some more tests.Eli Friedman2009-12-111-1/+1
| | | | llvm-svn: 91149
* Fix for PR5706: let mangleName deal with mangling names without identifiersEli Friedman2009-12-111-4/+1
| | | | | | correctly. llvm-svn: 91136
* Mangle static variables inside Objective-C methods in Objective-C++. We ↵Anders Carlsson2009-12-101-3/+24
| | | | | | currently mangle them the same way as gcc does. llvm-svn: 91042
* Mangle basic_ostream and basic_iostream specializations.Anders Carlsson2009-12-071-12/+34
| | | | llvm-svn: 90794
* Fix "using typename" and the instantiation of non-dependent using declarations.John McCall2009-12-041-0/+6
| | | | llvm-svn: 90614
* Put in FIXME that this mangling is not official in.Alexis Hunt2009-12-041-1/+1
| | | | llvm-svn: 90594
* Switch mangling of literal operator names to a string that'sAlexis Hunt2009-12-041-1/+1
| | | | | | | | | | a) legal b) likely to be chosen as the official mangling This will break ABI compatibility with all literal operator names, so you may need to recompile any such code. Sorry. llvm-svn: 90587
* Correctly mangle the 'std' namespace inside extern "C++" blocks.Anders Carlsson2009-12-041-13/+23
| | | | llvm-svn: 90544
* Note a failure I saw from the g++ testsuite:Mike Stump2009-12-031-0/+1
| | | | | | FAIL: g++.old-deja/g++.mike/eh23.C (test for excess errors) llvm-svn: 90374
* Work-in-progress: teach mangler how to mangle thunks for destructors.Eli Friedman2009-12-031-3/+13
| | | | llvm-svn: 90360
* Fix for PR5522 and PR5666: fix a bunch of mangling issues with extern variablesEli Friedman2009-12-021-11/+25
| | | | | | and funcctions declared locally within a function. llvm-svn: 90344
* Change rtti/Rtti to RTTI, as it is an acronym.Mike Stump2009-12-021-2/+2
| | | | llvm-svn: 90334
OpenPOWER on IntegriCloud