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 "llvm/ADT/DenseMap.h"
18
19namespace clang {
20
21class CXXMethodDecl;
22class FunctionProtoType;
23
24/// \brief Keeps track of the mangled names of lambda expressions within a
25/// particular context.
26class LambdaMangleContext {
27  llvm::DenseMap<const FunctionProtoType *, unsigned> ManglingNumbers;
28
29public:
30  /// \brief Retrieve the mangling number of a new lambda expression with the
31  /// given call operator within this lambda context.
32  unsigned getManglingNumber(CXXMethodDecl *CallOperator);
33};
34
35} // end namespace clang
36#endif
37