clang  3.9.0
MangleNumberingContext.h
Go to the documentation of this file.
1 //=== MangleNumberingContext.h - Context for mangling numbers ---*- 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 LambdaBlockMangleContext interface, which keeps track
11 // of the Itanium C++ ABI mangling numbers for lambda expressions and block
12 // literals.
13 //
14 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_AST_MANGLENUMBERINGCONTEXT_H
16 #define LLVM_CLANG_AST_MANGLENUMBERINGCONTEXT_H
17 
18 #include "clang/Basic/LLVM.h"
19 #include "llvm/ADT/DenseMap.h"
20 #include "llvm/ADT/IntrusiveRefCntPtr.h"
21 
22 namespace clang {
23 
24 class BlockDecl;
25 class CXXMethodDecl;
26 class IdentifierInfo;
27 class TagDecl;
28 class Type;
29 class VarDecl;
30 
31 /// \brief Keeps track of the mangled names of lambda expressions and block
32 /// literals within a particular context.
33 class MangleNumberingContext : public RefCountedBase<MangleNumberingContext> {
34 public:
36 
37  /// \brief Retrieve the mangling number of a new lambda expression with the
38  /// given call operator within this context.
39  virtual unsigned getManglingNumber(const CXXMethodDecl *CallOperator) = 0;
40 
41  /// \brief Retrieve the mangling number of a new block literal within this
42  /// context.
43  virtual unsigned getManglingNumber(const BlockDecl *BD) = 0;
44 
45  /// Static locals are numbered by source order.
46  virtual unsigned getStaticLocalNumber(const VarDecl *VD) = 0;
47 
48  /// \brief Retrieve the mangling number of a static local variable within
49  /// this context.
50  virtual unsigned getManglingNumber(const VarDecl *VD,
51  unsigned MSLocalManglingNumber) = 0;
52 
53  /// \brief Retrieve the mangling number of a static local variable within
54  /// this context.
55  virtual unsigned getManglingNumber(const TagDecl *TD,
56  unsigned MSLocalManglingNumber) = 0;
57 };
58 
59 } // end namespace clang
60 #endif
virtual unsigned getManglingNumber(const CXXMethodDecl *CallOperator)=0
Retrieve the mangling number of a new lambda expression with the given call operator within this cont...
VarDecl - An instance of this class is created to represent a variable declaration or definition...
Definition: Decl.h:768
virtual unsigned getStaticLocalNumber(const VarDecl *VD)=0
Static locals are numbered by source order.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Keeps track of the mangled names of lambda expressions and block literals within a particular context...
BlockDecl - This represents a block literal declaration, which is like an unnamed FunctionDecl...
Definition: Decl.h:3456
The l-value was considered opaque, so the alignment was determined from a type.
TagDecl - Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:2727
Represents a static or instance method of a struct/union/class.
Definition: DeclCXX.h:1736