: Context(C), Out(os) { }
bool mangle(const NamedDecl *D);
+ void mangleGuardVariable(const VarDecl *D);
private:
bool mangleFunctionDecl(const FunctionDecl *FD);
return false;
}
+void CXXNameMangler::mangleGuardVariable(const VarDecl *D)
+{
+ // <special-name> ::= GV <object name> # Guard variable for one-time
+ // # initialization
+
+ Out << "_ZGV";
+ mangleName(D);
+}
+
void CXXNameMangler::mangleFunctionEncoding(const FunctionDecl *FD) {
// <encoding> ::= <function name> <bare-function-type>
mangleName(FD);
os.flush();
return true;
}
+
+ /// mangleGuardVariable - Mangles the m
+ void mangleGuardVariable(const VarDecl *D, ASTContext &Context,
+ llvm::raw_ostream &os) {
+ CXXNameMangler Mangler(Context, os);
+ Mangler.mangleGuardVariable(D);
+
+ os.flush();
+ }
}
namespace clang {
class ASTContext;
class NamedDecl;
-
+ class VarDecl;
+
bool mangleName(const NamedDecl *D, ASTContext &Context,
llvm::raw_ostream &os);
+ void mangleGuardVariable(const VarDecl *D, ASTContext &Context,
+ llvm::raw_ostream &os);
}
#endif