/// @{
virtual bool shouldMangleDeclName(const NamedDecl *D) = 0;
- virtual void mangleName(const NamedDecl *D, llvm::raw_svector_ostream &)=0;
+ virtual void mangleName(const NamedDecl *D, llvm::raw_ostream &)=0;
virtual void mangleThunk(const CXXMethodDecl *MD,
const ThunkInfo &Thunk,
llvm::SmallVectorImpl<char> &) = 0;
virtual void mangleCXXRTTI(QualType T, llvm::SmallVectorImpl<char> &) = 0;
virtual void mangleCXXRTTIName(QualType T, llvm::SmallVectorImpl<char> &) = 0;
virtual void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type,
- llvm::raw_svector_ostream &) = 0;
+ llvm::raw_ostream &) = 0;
virtual void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type,
- llvm::raw_svector_ostream &) = 0;
+ llvm::raw_ostream &) = 0;
void mangleGlobalBlock(const BlockDecl *BD,
- llvm::raw_svector_ostream &Out);
+ llvm::raw_ostream &Out);
void mangleCtorBlock(const CXXConstructorDecl *CD, CXXCtorType CT,
- const BlockDecl *BD, llvm::raw_svector_ostream &Out);
+ const BlockDecl *BD, llvm::raw_ostream &Out);
void mangleDtorBlock(const CXXDestructorDecl *CD, CXXDtorType DT,
- const BlockDecl *BD, llvm::raw_svector_ostream &Out);
+ const BlockDecl *BD, llvm::raw_ostream &Out);
void mangleBlock(const DeclContext *DC, const BlockDecl *BD,
- llvm::raw_svector_ostream &Out);
+ llvm::raw_ostream &Out);
// Do the right thing.
- void mangleBlock(const BlockDecl *BD, llvm::raw_svector_ostream &Out);
+ void mangleBlock(const BlockDecl *BD, llvm::raw_ostream &Out);
void mangleObjCMethodName(const ObjCMethodDecl *MD,
llvm::SmallVectorImpl<char> &);
/// @{
bool shouldMangleDeclName(const NamedDecl *D);
- void mangleName(const NamedDecl *D, llvm::raw_svector_ostream &);
+ void mangleName(const NamedDecl *D, llvm::raw_ostream &);
void mangleThunk(const CXXMethodDecl *MD,
const ThunkInfo &Thunk,
llvm::SmallVectorImpl<char> &);
void mangleCXXRTTI(QualType T, llvm::SmallVectorImpl<char> &);
void mangleCXXRTTIName(QualType T, llvm::SmallVectorImpl<char> &);
void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type,
- llvm::raw_svector_ostream &);
+ llvm::raw_ostream &);
void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type,
- llvm::raw_svector_ostream &);
+ llvm::raw_ostream &);
void mangleItaniumGuardVariable(const VarDecl *D,
llvm::SmallVectorImpl<char> &);
/// CXXNameMangler - Manage the mangling of a single name.
class CXXNameMangler {
ItaniumMangleContext &Context;
- llvm::raw_svector_ostream &Out;
+ llvm::raw_ostream &Out;
const CXXMethodDecl *Structor;
unsigned StructorType;
ASTContext &getASTContext() const { return Context.getASTContext(); }
public:
- CXXNameMangler(ItaniumMangleContext &C, llvm::raw_svector_ostream &Out_)
+ CXXNameMangler(ItaniumMangleContext &C, llvm::raw_ostream &Out_)
: Context(C), Out(Out_), Structor(0), StructorType(0), SeqID(0) { }
- CXXNameMangler(ItaniumMangleContext &C, llvm::raw_svector_ostream &Out_,
+ CXXNameMangler(ItaniumMangleContext &C, llvm::raw_ostream &Out_,
const CXXConstructorDecl *D, CXXCtorType Type)
: Context(C), Out(Out_), Structor(getStructor(D)), StructorType(Type),
SeqID(0) { }
- CXXNameMangler(ItaniumMangleContext &C, llvm::raw_svector_ostream &Out_,
+ CXXNameMangler(ItaniumMangleContext &C, llvm::raw_ostream &Out_,
const CXXDestructorDecl *D, CXXDtorType Type)
: Context(C), Out(Out_), Structor(getStructor(D)), StructorType(Type),
SeqID(0) { }
free(result);
}
#endif
- llvm::raw_svector_ostream &getStream() { return Out; }
+ llvm::raw_ostream &getStream() { return Out; }
void mangle(const NamedDecl *D, llvm::StringRef Prefix = "_Z");
void mangleCallOffset(int64_t NonVirtual, int64_t Virtual);
/// emit the identifier of the declaration (\c D->getIdentifier()) as its
/// name.
void ItaniumMangleContext::mangleName(const NamedDecl *D,
- llvm::raw_svector_ostream &Out) {
+ llvm::raw_ostream &Out) {
assert((isa<FunctionDecl>(D) || isa<VarDecl>(D)) &&
"Invalid mangleName() call, argument is not a variable or function!");
assert(!isa<CXXConstructorDecl>(D) && !isa<CXXDestructorDecl>(D) &&
void ItaniumMangleContext::mangleCXXCtor(const CXXConstructorDecl *D,
CXXCtorType Type,
- llvm::raw_svector_ostream &Out) {
+ llvm::raw_ostream &Out) {
CXXNameMangler Mangler(*this, Out, D, Type);
Mangler.mangle(D);
}
void ItaniumMangleContext::mangleCXXDtor(const CXXDestructorDecl *D,
CXXDtorType Type,
- llvm::raw_svector_ostream &Out) {
+ llvm::raw_ostream &Out) {
CXXNameMangler Mangler(*this, Out, D, Type);
Mangler.mangle(D);
}
static void mangleFunctionBlock(MangleContext &Context,
llvm::StringRef Outer,
const BlockDecl *BD,
- llvm::raw_svector_ostream &Out) {
+ llvm::raw_ostream &Out) {
Out << "__" << Outer << "_block_invoke_" << Context.getBlockId(BD, true);
}
}
void MangleContext::mangleGlobalBlock(const BlockDecl *BD,
- llvm::raw_svector_ostream &Out) {
+ llvm::raw_ostream &Out) {
Out << "__block_global_" << getBlockId(BD, false);
}
void MangleContext::mangleCtorBlock(const CXXConstructorDecl *CD,
CXXCtorType CT, const BlockDecl *BD,
- llvm::raw_svector_ostream &ResStream) {
+ llvm::raw_ostream &ResStream) {
checkMangleDC(CD, BD);
llvm::SmallString<64> Buffer;
llvm::raw_svector_ostream Out(Buffer);
void MangleContext::mangleDtorBlock(const CXXDestructorDecl *DD,
CXXDtorType DT, const BlockDecl *BD,
- llvm::raw_svector_ostream &ResStream) {
+ llvm::raw_ostream &ResStream) {
checkMangleDC(DD, BD);
llvm::SmallString<64> Buffer;
llvm::raw_svector_ostream Out(Buffer);
}
void MangleContext::mangleBlock(const DeclContext *DC, const BlockDecl *BD,
- llvm::raw_svector_ostream &Out) {
+ llvm::raw_ostream &Out) {
assert(!isa<CXXConstructorDecl>(DC) && !isa<CXXDestructorDecl>(DC));
checkMangleDC(DC, BD);
}
void MangleContext::mangleBlock(const BlockDecl *BD,
- llvm::raw_svector_ostream &Out) {
+ llvm::raw_ostream &Out) {
const DeclContext *DC = BD->getDeclContext();
while (isa<BlockDecl>(DC) || isa<EnumDecl>(DC))
DC = DC->getParent();
/// Microsoft Visual C++ ABI.
class MicrosoftCXXNameMangler {
MangleContext &Context;
- llvm::raw_svector_ostream &Out;
+ llvm::raw_ostream &Out;
ASTContext &getASTContext() const { return Context.getASTContext(); }
public:
- MicrosoftCXXNameMangler(MangleContext &C, llvm::raw_svector_ostream &Out_)
+ MicrosoftCXXNameMangler(MangleContext &C, llvm::raw_ostream &Out_)
: Context(C), Out(Out_) { }
void mangle(const NamedDecl *D, llvm::StringRef Prefix = "?");
MicrosoftMangleContext(ASTContext &Context,
Diagnostic &Diags) : MangleContext(Context, Diags) { }
virtual bool shouldMangleDeclName(const NamedDecl *D);
- virtual void mangleName(const NamedDecl *D, llvm::raw_svector_ostream &Out);
+ virtual void mangleName(const NamedDecl *D, llvm::raw_ostream &Out);
virtual void mangleThunk(const CXXMethodDecl *MD,
const ThunkInfo &Thunk,
llvm::SmallVectorImpl<char> &);
virtual void mangleCXXRTTI(QualType T, llvm::SmallVectorImpl<char> &);
virtual void mangleCXXRTTIName(QualType T, llvm::SmallVectorImpl<char> &);
virtual void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type,
- llvm::raw_svector_ostream &);
+ llvm::raw_ostream &);
virtual void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type,
- llvm::raw_svector_ostream &);
+ llvm::raw_ostream &);
virtual void mangleReferenceTemporary(const clang::VarDecl *,
llvm::SmallVectorImpl<char> &);
};
}
void MicrosoftMangleContext::mangleName(const NamedDecl *D,
- llvm::raw_svector_ostream &Out) {
+ llvm::raw_ostream &Out) {
assert((isa<FunctionDecl>(D) || isa<VarDecl>(D)) &&
"Invalid mangleName() call, argument is not a variable or function!");
assert(!isa<CXXConstructorDecl>(D) && !isa<CXXDestructorDecl>(D) &&
}
void MicrosoftMangleContext::mangleCXXCtor(const CXXConstructorDecl *D,
CXXCtorType Type,
- llvm::raw_svector_ostream &) {
+ llvm::raw_ostream &) {
assert(false && "Can't yet mangle constructors!");
}
void MicrosoftMangleContext::mangleCXXDtor(const CXXDestructorDecl *D,
CXXDtorType Type,
- llvm::raw_svector_ostream &) {
+ llvm::raw_ostream &) {
assert(false && "Can't yet mangle destructors!");
}
void MicrosoftMangleContext::mangleReferenceTemporary(const clang::VarDecl *,