Home | History | Annotate | Download | only in AST
      1 //===--- LambdaMangleContext.h - Context for mangling lambdas ---*- C++ -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 //
     10 //  This file defines the LambdaMangleContext interface, which keeps track of
     11 //  the Itanium C++ ABI mangling numbers for lambda expressions.
     12 //
     13 //===----------------------------------------------------------------------===//
     14 #ifndef LLVM_CLANG_LAMBDAMANGLECONTEXT_H
     15 #define LLVM_CLANG_LAMBDAMANGLECONTEXT_H
     16 
     17 #include "clang/Basic/LLVM.h"
     18 #include "llvm/ADT/DenseMap.h"
     19 #include "llvm/ADT/IntrusiveRefCntPtr.h"
     20 
     21 namespace clang {
     22 
     23 class CXXMethodDecl;
     24 class FunctionProtoType;
     25 
     26 /// \brief Keeps track of the mangled names of lambda expressions within a
     27 /// particular context.
     28 class LambdaMangleContext : public RefCountedBase<LambdaMangleContext> {
     29   llvm::DenseMap<const FunctionProtoType *, unsigned> ManglingNumbers;
     30 
     31 public:
     32   /// \brief Retrieve the mangling number of a new lambda expression with the
     33   /// given call operator within this lambda context.
     34   unsigned getManglingNumber(CXXMethodDecl *CallOperator);
     35 };
     36 
     37 } // end namespace clang
     38 #endif
     39