[cfe-commits] r125330 - in /cfe/trunk: include/clang/AST/Mangle.h lib/AST/ItaniumMangle.cpp lib/AST/Mangle.cpp lib/AST/MicrosoftMangle.cpp
Rafael Espindola
rafael.espindola at gmail.com
Thu Feb 10 17:41:00 PST 2011
Author: rafael
Date: Thu Feb 10 19:41:00 2011
New Revision: 125330
URL: http://llvm.org/viewvc/llvm-project?rev=125330&view=rev
Log:
Use raw_ostream instead of raw_svector_ostream.
Modified:
cfe/trunk/include/clang/AST/Mangle.h
cfe/trunk/lib/AST/ItaniumMangle.cpp
cfe/trunk/lib/AST/Mangle.cpp
cfe/trunk/lib/AST/MicrosoftMangle.cpp
Modified: cfe/trunk/include/clang/AST/Mangle.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Mangle.h?rev=125330&r1=125329&r2=125330&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Mangle.h (original)
+++ cfe/trunk/include/clang/AST/Mangle.h Thu Feb 10 19:41:00 2011
@@ -95,7 +95,7 @@
/// @{
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;
@@ -114,20 +114,20 @@
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> &);
Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=125330&r1=125329&r2=125330&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Thu Feb 10 19:41:00 2011
@@ -91,7 +91,7 @@
/// @{
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> &);
@@ -110,9 +110,9 @@
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> &);
@@ -136,7 +136,7 @@
/// 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;
@@ -149,13 +149,13 @@
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) { }
@@ -171,7 +171,7 @@
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);
@@ -2537,7 +2537,7 @@
/// 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) &&
@@ -2553,14 +2553,14 @@
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);
}
Modified: cfe/trunk/lib/AST/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Mangle.cpp?rev=125330&r1=125329&r2=125330&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Mangle.cpp (original)
+++ cfe/trunk/lib/AST/Mangle.cpp Thu Feb 10 19:41:00 2011
@@ -39,7 +39,7 @@
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);
}
@@ -55,13 +55,13 @@
}
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);
@@ -72,7 +72,7 @@
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);
@@ -82,7 +82,7 @@
}
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);
@@ -124,7 +124,7 @@
}
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();
Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=125330&r1=125329&r2=125330&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Thu Feb 10 19:41:00 2011
@@ -29,12 +29,12 @@
/// 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 = "?");
@@ -80,7 +80,7 @@
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> &);
@@ -97,9 +97,9 @@
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> &);
};
@@ -1122,7 +1122,7 @@
}
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) &&
@@ -1170,12 +1170,12 @@
}
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 *,
More information about the cfe-commits
mailing list