@@ -53,8 +53,8 @@ use std::rc::Rc;
5353}
5454
5555bool Converter::VisitRecoveryExpr (clang::RecoveryExpr *expr) {
56- verrs () << " RecoveryExpr: " ;
57- expr->dump (verrs (), ctx_);
56+ llvm::errs () << " RecoveryExpr: " ;
57+ expr->dump (llvm::errs (), ctx_);
5858 exit (1 );
5959 return false ;
6060}
@@ -123,7 +123,7 @@ bool Converter::VisitBuiltinType(clang::BuiltinType *type) {
123123 break ;
124124 default :
125125 // FIXME: improve error handling
126- verrs () << " unsupported builtin type\n " ;
126+ log () << " unsupported builtin type\n " ;
127127 break ;
128128 }
129129 return false ;
@@ -152,7 +152,7 @@ bool Converter::VisitRecordType(clang::RecordType *type) {
152152}
153153
154154std::string Converter::ConvertPointer (clang::Expr *expr, int line) {
155- verrs () << " ConvertPointer called from line " << line << " \n " ;
155+ log () << " ConvertPointer called from line " << line << " \n " ;
156156 PushExprKind push (*this , ExprKind::AddrOf);
157157 return ToString (expr);
158158}
@@ -176,7 +176,7 @@ std::string Converter::ConvertLValue(clang::Expr *expr) {
176176}
177177
178178std::string Converter::ConvertRValue (clang::Expr *expr, int line) {
179- verrs () << " ConvertRValue called from line " << line << " \n " ;
179+ log () << " ConvertRValue called from line " << line << " \n " ;
180180 PushExprKind push (*this , ExprKind::RValue);
181181 return ToString (expr);
182182}
@@ -296,7 +296,7 @@ bool Converter::VisitFunctionDecl(clang::FunctionDecl *decl) {
296296 if (!IsInMainFile (decl) && !decl_ids_.insert (GetID (decl)).second ) {
297297 return false ;
298298 }
299- decl->dump (verrs ());
299+ decl->dump (log ());
300300 curr_function_ = decl;
301301 std::string function_name;
302302 if (decl->isMain ()) {
@@ -583,7 +583,7 @@ static bool recordDerivesCopy(const clang::RecordDecl *decl) {
583583}
584584
585585bool Converter::VisitRecordDecl (clang::RecordDecl *decl) {
586- decl->dump (verrs ());
586+ decl->dump (log ());
587587
588588 // VisitCXXRecordDecl already visited the record
589589 if (clang::isa<clang::CXXRecordDecl>(decl)) {
@@ -695,7 +695,7 @@ bool Converter::VisitCXXRecordDecl(clang::CXXRecordDecl *decl) {
695695 materializeTemplateSpecialization (decl);
696696 }
697697
698- decl->dump (verrs ());
698+ decl->dump (log ());
699699
700700 Mapper::AddRuleForUserDefinedType (decl);
701701 if (!IsConvertibleCXXRecordDecl (decl)) {
@@ -742,7 +742,7 @@ bool Converter::VisitCXXRecordDecl(clang::CXXRecordDecl *decl) {
742742}
743743
744744bool Converter::VisitCXXMethodDecl (clang::CXXMethodDecl *decl) {
745- decl->dump (verrs ());
745+ decl->dump (log ());
746746 if (!IsConvertibleCXXMethodDecl (decl)) {
747747 return false ;
748748 }
@@ -1086,10 +1086,10 @@ bool Converter::VisitCXXForRangeStmt(clang::CXXForRangeStmt *stmt) {
10861086
10871087 if (!Mapper::Contains (range_init_type.getUnqualifiedType ())) {
10881088 // FIXME: improve error handling
1089- verrs () << " for range stmts only for types in std namespace\n " ;
1089+ log () << " for range stmts only for types in std namespace\n " ;
10901090 }
10911091
1092- verrs () << " GetClassName: " << GetClassName (range_init_type) << " \n " ;
1092+ log () << " GetClassName: " << GetClassName (range_init_type) << " \n " ;
10931093
10941094 if (GetClassName (range_init_type) == " std::map" ) {
10951095 return VisitCXXForRangeStmtMap (stmt);
@@ -2364,8 +2364,8 @@ bool Converter::ConvertCXXOperatorCallExpr(clang::CXXOperatorCallExpr *expr) {
23642364 break ;
23652365 default :
23662366 // FIXME: improve error handling
2367- verrs () << " unsupported CXXOperatorCallExpr: "
2368- << clang::getOperatorSpelling (expr->getOperator ()) << ' \n ' ;
2367+ llvm::errs () << " unsupported CXXOperatorCallExpr: "
2368+ << clang::getOperatorSpelling (expr->getOperator ()) << ' \n ' ;
23692369 assert (0 );
23702370 }
23712371 return false ;
@@ -2693,7 +2693,7 @@ bool Converter::VisitUnaryExprOrTypeTraitExpr(
26932693 break ;
26942694 default :
26952695 // FIXME: improve error handling
2696- verrs () << " unsupported unary expr or type trait expr\n " ;
2696+ log () << " unsupported unary expr or type trait expr\n " ;
26972697 }
26982698 return false ;
26992699}
@@ -3345,7 +3345,8 @@ void Converter::AddOrdTrait(const clang::CXXRecordDecl *decl) {
33453345 }
33463346
33473347 if (methods.size () > 1 ) {
3348- verrs () << " Currently supporting only one overloaded comparison operator\n " ;
3348+ llvm::errs ()
3349+ << " Currently supporting only one overloaded comparison operator\n " ;
33493350 abort ();
33503351 }
33513352
@@ -3436,8 +3437,8 @@ void Converter::ConvertUnsignedArithBinaryOperator(clang::BinaryOperator *op,
34363437 break ;
34373438 default :
34383439 // FIXME: improve error handling
3439- verrs () << " unsupported unsigned binary operator: " << opcode << ' \n ' ;
3440- op->dump (verrs (), ctx_);
3440+ llvm::errs () << " unsupported unsigned binary operator: " << opcode << ' \n ' ;
3441+ op->dump (llvm::errs (), ctx_);
34413442 assert (0 );
34423443 }
34433444 PushParen paren (*this );
@@ -3747,9 +3748,9 @@ void Converter::SetFreshType(clang::QualType type) {
37473748}
37483749
37493750void Converter::dump_expr_kinds () {
3750- verrs () << " isRValue: " << isRValue () << " , isXValue: " << isXValue ()
3751- << " , isAddrOf: " << isAddrOf () << " , isObject: " << isObject ()
3752- << " , isVoid: " << isVoid () << " \n " ;
3751+ log () << " isRValue: " << isRValue () << " , isXValue: " << isXValue ()
3752+ << " , isAddrOf: " << isAddrOf () << " , isObject: " << isObject ()
3753+ << " , isVoid: " << isVoid () << " \n " ;
37533754}
37543755
37553756void Converter::emplace_back_plugin_construct_arg (
0 commit comments