summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/Mangle.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/Mangle.h')
-rw-r--r--clang/lib/CodeGen/Mangle.h34
1 files changed, 22 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/Mangle.h b/clang/lib/CodeGen/Mangle.h
index 91143a5c4bd..8ab5d5edf36 100644
--- a/clang/lib/CodeGen/Mangle.h
+++ b/clang/lib/CodeGen/Mangle.h
@@ -33,21 +33,31 @@ namespace clang {
class NamedDecl;
class VarDecl;
- bool mangleName(const NamedDecl *D, ASTContext &Context,
+ class MangleContext {
+ ASTContext &Context;
+ public:
+ explicit MangleContext(ASTContext &Context)
+ : Context(Context) { }
+
+ ASTContext &getASTContext() const { return Context; }
+ };
+
+ bool mangleName(MangleContext &Context, const NamedDecl *D,
llvm::raw_ostream &os);
- void mangleThunk(const FunctionDecl *FD, int64_t n, int64_t vn,
- ASTContext &Context, llvm::raw_ostream &os);
- void mangleCovariantThunk(const FunctionDecl *FD, int64_t nv_t, int64_t v_t,
- int64_t nv_r, int64_t v_r, ASTContext &Context,
+ void mangleThunk(MangleContext &Context, const FunctionDecl *FD,
+ int64_t n, int64_t vn, llvm::raw_ostream &os);
+ void mangleCovariantThunk(MangleContext &Context, const FunctionDecl *FD,
+ int64_t nv_t, int64_t v_t,
+ int64_t nv_r, int64_t v_r,
llvm::raw_ostream &os);
- void mangleGuardVariable(const VarDecl *D, ASTContext &Context,
+ void mangleGuardVariable(MangleContext &Context, const VarDecl *D,
llvm::raw_ostream &os);
- void mangleCXXVtable(QualType T, ASTContext &Context, llvm::raw_ostream &os);
- void mangleCXXRtti(QualType T, ASTContext &Context, llvm::raw_ostream &os);
- void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type,
- ASTContext &Context, llvm::raw_ostream &os);
- void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type,
- ASTContext &Context, llvm::raw_ostream &os);
+ void mangleCXXVtable(MangleContext &Context, QualType T, llvm::raw_ostream &os);
+ void mangleCXXRtti(MangleContext &Context, QualType T, llvm::raw_ostream &os);
+ void mangleCXXCtor(MangleContext &Context, const CXXConstructorDecl *D,
+ CXXCtorType Type, llvm::raw_ostream &os);
+ void mangleCXXDtor(MangleContext &Context, const CXXDestructorDecl *D,
+ CXXDtorType Type, llvm::raw_ostream &os);
}
#endif
OpenPOWER on IntegriCloud