1 //===--- LambdaMangleContext.h - Context for mangling lambdas ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the LambdaMangleContext interface, which keeps track of
11 // the Itanium C++ ABI mangling numbers for lambda expressions.
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_LAMBDAMANGLECONTEXT_H
15 #define LLVM_CLANG_LAMBDAMANGLECONTEXT_H
17 #include "clang/Basic/LLVM.h"
18 #include "llvm/ADT/DenseMap.h"
19 #include "llvm/ADT/IntrusiveRefCntPtr.h"
24 class FunctionProtoType;
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;
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);
37 } // end namespace clang