summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ItaniumMangle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Basic, untested implementation for an "unknown any" type requested by LLDB.John McCall2011-04-071-0/+1
| | | | | | | | | | | | The idea is that you can create a VarDecl with an unknown type, or a FunctionDecl with an unknown return type, and it will still be valid to access that object as long as you explicitly cast it at every use. I'm still going back and forth about how I want to test this effectively, but I wanted to go ahead and provide a skeletal implementation for the LLDB folks' benefit and because it also improves some diagnostic goodness for placeholder expressions. llvm-svn: 129065
* Do not use IR marker for LLVM intrinsicsPeter Collingbourne2011-04-061-2/+3
| | | | llvm-svn: 129001
* File-scope static functions need to be mangled with 'L' so thatJohn McCall2011-03-221-4/+6
| | | | | | | | they don't collide with file-scope extern functions from the same translation unit. This is basically a matter of applying the same logic to FunctionDecls as we were previously applying to VarDecls. llvm-svn: 128072
* Add support for the OpenCL vec_step operator, by generalising andPeter Collingbourne2011-03-111-4/+16
| | | | | | | extending the existing support for sizeof and alignof. Original patch by Guy Benyei. llvm-svn: 127475
* Add a missing break, from John WiegleyDouglas Gregor2011-03-031-0/+1
| | | | llvm-svn: 126919
* When we encounter a dependent template name within aDouglas Gregor2011-02-281-1/+12
| | | | | | | | | | | | nested-name-specifier, e.g., T::template apply<U>:: represent the dependent template name specialization as a DependentTemplateSpecializationType, rather than a TemplateSpecializationType with a dependent TemplateName. llvm-svn: 126593
* Teach NestedNameSpecifier to keep track of namespace aliases the sameDouglas Gregor2011-02-241-0/+3
| | | | | | | | way it keeps track of namespaces. Previously, we would map from the namespace alias to its underlying namespace when building a nested-name-specifier, losing source information in the process. llvm-svn: 126358
* Mangling of undeduced 'auto' types, as specified by Itanium C++ ABI.Richard Smith2011-02-211-2/+5
| | | | llvm-svn: 126140
* Implement the C++0x deduced 'auto' feature.Richard Smith2011-02-201-3/+6
| | | | | | This fixes PR 8738, 9060 and 9132. llvm-svn: 126069
* Change the representation of GNU ?: expressions to use a different expressionJohn McCall2011-02-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | class and to bind the shared value using OpaqueValueExpr. This fixes an unnoticed problem with deserialization of these expressions where the deserialized form would lose the vital pointer-equality trait; or rather, it fixes it because this patch also does the right thing for deserializing OVEs. Change OVEs to not be a "temporary object" in the sense that copy elision is permitted. This new representation is not totally unawkward to work with, but I think that's really part and parcel with the semantics we're modelling here. In particular, it's much easier to fix things like the copy elision bug and to make the CFG look right. I've tried to update the analyzer to deal with this in at least some obvious cases, and I think we get a much better CFG out, but the printing of OpaqueValueExprs probably needs some work. llvm-svn: 125744
* Add a hack to avoid adding '\01' to asm names when possible. It would beRafael Espindola2011-02-151-1/+12
| | | | | | | better for clang to always compute the right name, but for now this hack fixes PR9177 and lets us build firefox with LTO :-) llvm-svn: 125607
* For consistency, use llvm::raw_ostream in the rest of the mangle api.Rafael Espindola2011-02-111-32/+19
| | | | llvm-svn: 125360
* Use raw_ostream instead of raw_svector_ostream.Rafael Espindola2011-02-111-11/+11
| | | | llvm-svn: 125330
* Use raw_svector_ostream in more places in the mangler.Rafael Espindola2011-02-101-27/+37
| | | | llvm-svn: 125321
* AST, Sema, Serialization: add CUDAKernelCallExpr and related semantic actionsPeter Collingbourne2011-02-091-1/+2
| | | | llvm-svn: 125217
* Remove vtables from the Stmt hierarchy; this was pretty easy asJohn McCall2011-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | there were only three virtual methods of any significance. The primary way to grab child iterators now is with Stmt::child_range children(); Stmt::const_child_range children() const; where a child_range is just a std::pair of iterators suitable for being llvm::tie'd to some locals. I've left the old child_begin() and child_end() accessors in place, but it's probably a substantial penalty to grab the iterators individually now, since the switch-based dispatch is kindof inherently slower than vtable dispatch. Grabbing them together is probably a slight win over the status quo, although of course we could've achieved that with vtables, too. I also reclassified SwitchCase (correctly) as an abstract Stmt class, which (as the first such class that wasn't an Expr subclass) required some fiddling in a few places. There are somewhat gross metaprogramming hooks in place to ensure that new statements/expressions continue to implement getSourceRange() and children(). I had to work around a recent clang bug; dgregor actually fixed it already, but I didn't want to introduce a selfhosting dependency on ToT. llvm-svn: 125183
* When mangling a qualified array type, push the qualifiers down to theJohn McCall2011-01-261-11/+25
| | | | | | element type. Fixes rdar://problem/8913416. llvm-svn: 124315
* Rvalue references for *this: add name mangling for ref-qualifiers,Douglas Gregor2011-01-261-4/+28
| | | | | | | | using rules that I just made up this morning. This encoding has now been proposed to the Itanium C++ ABI group for inclusion, but of course it's still possible that the mangling will change. llvm-svn: 124296
* Change QualType::getTypePtr() to return a const pointer, then change aJohn McCall2011-01-191-1/+2
| | | | | | thousand other things which were (generally inadvertantly) relying on that. llvm-svn: 123814
* Introduce a new kind of TemplateName that captures a substitutedDouglas Gregor2011-01-151-0/+6
| | | | | | | | | | | | | | | template template parameter pack that cannot be fully expanded because its enclosing pack expansion could not be expanded. This form of TemplateName plays the same role as SubstTemplateTypeParmPackType and SubstNonTypeTemplateParmPackExpr do for template type parameter packs and non-type template parameter packs, respectively. We should now handle these multi-level pack expansion substitutions anywhere. The largest remaining gap in our variadic-templates support is that we cannot cope with non-type template parameter packs whose type is a pack expansion. llvm-svn: 123521
* Introduce a new expression kind, SubstNonTypeTemplateParmPackExpr,Douglas Gregor2011-01-151-0/+5
| | | | | | | | | that captures the substitution of a non-type template argument pack for a non-type template parameter pack within a pack expansion that cannot be fully expanded. This follows the approach taken by SubstTemplateTypeParmPackType. llvm-svn: 123506
* Start implementing support for substitution into pack expansions thatDouglas Gregor2011-01-141-0/+5
| | | | | | | | | | | | | | | | | involve template parameter packs at multiple template levels that occur within the signatures members of class templates (and partial specializations thereof). This is a work-in-progress that is deficient in several ways, notably: - It only works for template type parameter packs, but we need to also support non-type template parameter packs and template template parameter packs. - It doesn't keep track of the lengths of the substituted argument packs in the expansion, so it can't properly diagnose length mismatches. However, this is a concrete step in the right direction. llvm-svn: 123425
* Move name mangling support from CodeGen to AST. In thePeter Collingbourne2011-01-131-0/+2625
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. llvm-svn: 123386
OpenPOWER on IntegriCloud