summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/Mangle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add DeclarationName support for C++0x operator literals. They should now work asAlexis Hunt2009-11-291-0/+6
| | | | | | | function names outside of templates - they'll probably cause some damage there as they're largely untested. llvm-svn: 90064
* Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.Benjamin Kramer2009-11-281-1/+0
| | | | llvm-svn: 90044
* Add a CovariantThunkAdjustment struct that represents the adjustments needed ↵Anders Carlsson2009-11-261-5/+6
| | | | | | for a covariant thunk. llvm-svn: 89933
* Move the mangler into the CodeGen namespace. Change mangleThunk to take a ↵Anders Carlsson2009-11-261-13/+12
| | | | | | ThunkAdjustment. llvm-svn: 89930
* Add a ThunkAdjustment struct which holds a non-virtual and a virtual ↵Anders Carlsson2009-11-261-28/+33
| | | | | | adjustment offset. Start using it. General cleanup in Mangle.cpp. llvm-svn: 89925
* When mangling a ctor/dtor we need to take into consideration whether it's a ↵Anders Carlsson2009-11-241-2/+17
| | | | | | member template. llvm-svn: 89741
* This patch implements objective-c's 'SEL' type as a built-inFariborz Jahanian2009-11-211-0/+1
| | | | | | | | | | | | | | | | | | type and fixes a long-standing code gen. crash reported in at least two PRs and a radar. (radar 7405040 and pr5025). There are couple of remaining issues that I would like for Ted. and Doug to look at: Ted, please look at failure in Analysis/MissingDealloc.m. I have temporarily added an expected-warning to make the test pass. This tests has a declaration of 'SEL' type which may not co-exist with the new changes. Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp. I think the changes which I have ifdef'ed out are correct. They need be considered for in a few Indexer/PCH test cases. llvm-svn: 89561
* Mangler: Sketch mangling for TemplateArgument::Declaration kind.Daniel Dunbar2009-11-211-27/+32
| | | | | | - Several important FIXMEs related to whether arguments are expressions or external names, and the mangling of extern "C" names (c.f., PR5522). llvm-svn: 89556
* Mangler: Lift shouldMangleDeclName predicate out of CXXNameMangler::mangle.Daniel Dunbar2009-11-211-36/+44
| | | | | | | | - 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. llvm-svn: 89555
* Mangler: Strengthen invariants, MangleContext::mangleName should only be ↵Daniel Dunbar2009-11-211-15/+12
| | | | | | called on var or function decls. llvm-svn: 89554
* Mangler: Inline a bunch of functions into their sole caller, not that I ↵Daniel Dunbar2009-11-211-106/+56
| | | | | | don't love typing for typings sake, but... llvm-svn: 89553
* Remove dead variable.Daniel Dunbar2009-11-211-1/+0
| | | | llvm-svn: 89551
* Mangler: Split isStdNamespace for when the caller already has a NamespaceDecl.Daniel Dunbar2009-11-211-5/+6
| | | | llvm-svn: 89550
* IRgen: Eliminate CXXNameMangler::mangleCXX{C,D}tor.Daniel Dunbar2009-11-211-24/+10
| | | | llvm-svn: 89549
* IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,Daniel Dunbar2009-11-211-48/+29
| | | | | | | instead of requiring clients to make a raw_svector_ostream, which is just an implementation detail. llvm-svn: 89548
* Sink free mangle* methods into MangleContext.Daniel Dunbar2009-11-211-178/+175
| | | | llvm-svn: 89547
* Delete trailing space.Daniel Dunbar2009-11-211-85/+85
| | | | llvm-svn: 89545
* Draw a brighter line between "unresolved" expressions, where we have done theJohn McCall2009-11-191-2/+2
| | | | | | | | appropriate lookup and simply can't resolve the referrent yet, and "dependent scope" expressions, where we can't do the lookup yet because the entity we need to look into is a dependent type. llvm-svn: 89402
* First part of changes to eliminate problems with cv-qualifiers andDouglas Gregor2009-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sugared types. The basic problem is that our qualifier accessors (getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at the current QualType and not at any qualifiers that come from sugared types, meaning that we won't see these qualifiers through, e.g., typedefs: typedef const int CInt; typedef CInt Self; Self.isConstQualified() currently returns false! Various bugs (e.g., PR5383) have cropped up all over the front end due to such problems. I'm addressing this problem by splitting each qualifier accessor into two versions: - the "local" version only returns qualifiers on this particular QualType instance - the "normal" version that will eventually combine qualifiers from this QualType instance with the qualifiers on the canonical type to produce the full set of qualifiers. This commit adds the local versions and switches a few callers from the "normal" version (e.g., isConstQualified) over to the "local" version (e.g., isLocalConstQualified) when that is the right thing to do, e.g., because we're printing or serializing the qualifiers. Also, switch a bunch of Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType() expressions over to Context.hasSameUnqualifiedType(T1, T2) llvm-svn: 88969
* Implement typeid for class types.Mike Stump2009-11-151-0/+2
| | | | llvm-svn: 88843
* Mangling support for typeinfo names.Mike Stump2009-11-141-0/+16
| | | | llvm-svn: 88726
* Finish off mangling for the VTT.Mike Stump2009-11-101-0/+8
| | | | llvm-svn: 86647
* Add mangling for the construction vtable.Mike Stump2009-11-101-0/+22
| | | | llvm-svn: 86643
* Always mangle functions with special names. Fixes PR5420.Anders Carlsson2009-11-071-3/+5
| | | | llvm-svn: 86350
* When looking up and adding substitutions to the substitution table, make ↵Anders Carlsson2009-11-071-0/+3
| | | | | | sure to always use the canonical declaration. With tihs change, FileCheck compiles and links but crashes during startup. llvm-svn: 86339
* Handle ParenExprs in mangleExpression.Anders Carlsson2009-11-061-0/+5
| | | | llvm-svn: 86218
* Fix thinko, mangleCXXRtti should obviously take a QualType!Anders Carlsson2009-10-301-5/+4
| | | | llvm-svn: 85565
* mangleCXXRtti obviously needs to take a type, what was I thinking...Anders Carlsson2009-10-301-5/+7
| | | | llvm-svn: 85555
* Mangle based on the declaration we're given, not the canonicalDouglas Gregor2009-10-281-1/+2
| | | | | | | | declaration, since attributes that affect mangling may have been added to subsequent declarations. However, to determine the linkage of the declaration, we need to look at the canonical declaration. Fixes PR4412. llvm-svn: 85400
* Add mangling for VTTs.Mike Stump2009-10-281-0/+7
| | | | llvm-svn: 85363
* When building types from declarators, instead of building two types (one forJohn McCall2009-10-221-1/+6
| | | | | | | | | | | | | | | | | | | | | the DeclaratorInfo, one for semantic analysis), just build a single type whose canonical type will reflect the semantic analysis (assuming the type is well-formed, of course). To make that work, make a few changes to the type system: * allow the nominal pointee type of a reference type to be a (possibly sugared) reference type. Also, preserve the original spelling of the reference type. Both of these can be ignored on canonical reference types. * Remove ObjCProtocolListType and preserve the associated source information on the various ObjC TypeLocs. Preserve the spelling of protocol lists except in the canonical form. * Preserve some level of source type structure on parameter types, but canonicalize on the canonical function type. This is still a WIP. Drops code size, makes strides towards accurate source location representation, slight (~1.7%) progression on Cocoa.h because of complexity drop. llvm-svn: 84907
* PR5218: Replace IdentifierInfo::getName with StringRef version, now that clientsDaniel Dunbar2009-10-181-1/+1
| | | | | | are updated. llvm-svn: 84447
* Move misc clients to IdentifierInfo StringRef API.Daniel Dunbar2009-10-181-4/+1
| | | | | | | | | - strcmp -> == - OS.write(II->getName() ...) -> OS << II->getNameStr() - Avoid std::string concatenation - Use getNameStr().str() when an std::string is really needed. llvm-svn: 84437
* Builtin types are subsitutable if they are qualified. Fixes PR5196.Anders Carlsson2009-10-161-1/+1
| | | | llvm-svn: 84237
* Change mangleCXXVtable and mangleCXXRtti to take CXXRecordDecls instead of ↵Anders Carlsson2009-10-111-10/+10
| | | | | | QualTypes. llvm-svn: 83793
* Mangle std::basic_ostream<char, std::char_traits<char>> as So.Anders Carlsson2009-10-081-0/+18
| | | | llvm-svn: 83557
* Mangle anonymous structs/unions correctly. Fixes PR5139.Anders Carlsson2009-10-071-3/+34
| | | | llvm-svn: 83448
* Add a MangleContext and pass it to all mangle functions. It will be used for ↵Anders Carlsson2009-10-071-20/+22
| | | | | | keeping state, such as identifiers assigned to anonymous structs as well as scope encoding. llvm-svn: 83442
* When mangling names, always use the canonical decl. Fixes PR5144.Anders Carlsson2009-10-061-1/+1
| | | | llvm-svn: 83420
* Anonymous namespaces, sema + codegen. A lot of semantics are still broken,John McCall2009-10-011-3/+11
| | | | | | apparently because using directives aren't quite working correctly. llvm-svn: 83184
OpenPOWER on IntegriCloud