aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/JSBackend/CallHandlers.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/JSBackend/CallHandlers.h')
-rw-r--r--lib/Target/JSBackend/CallHandlers.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/Target/JSBackend/CallHandlers.h b/lib/Target/JSBackend/CallHandlers.h
index 266b0596a6..ab4bc2e950 100644
--- a/lib/Target/JSBackend/CallHandlers.h
+++ b/lib/Target/JSBackend/CallHandlers.h
@@ -49,29 +49,20 @@ DEF_CALL_HANDLER(__default__, {
unsigned TypeNumArgs = FT->getNumParams();
unsigned ActualNumArgs = getNumArgOperands(CI);
if (TypeNumArgs != ActualNumArgs) {
- errs().changeColor(raw_ostream::YELLOW);
- errs() << "warning:";
- errs().resetColor();
- errs() << " unexpected number of arguments " << utostr(ActualNumArgs) << " in call to '" << F->getName() << "', should be " << utostr(TypeNumArgs) << "\n";
+ prettyWarning() << "unexpected number of arguments " << utostr(ActualNumArgs) << " in call to '" << F->getName() << "', should be " << utostr(TypeNumArgs) << "\n";
}
for (unsigned i = 0; i < std::min(TypeNumArgs, ActualNumArgs); i++) {
Type *TypeType = FT->getParamType(i);
Type *ActualType = CI->getOperand(i)->getType();
if (getFunctionSignatureLetter(TypeType) != getFunctionSignatureLetter(ActualType)) {
- errs().changeColor(raw_ostream::YELLOW);
- errs() << "warning:";
- errs().resetColor();
- errs() << " unexpected argument type " << *ActualType << " at index " << utostr(i) << " in call to '" << F->getName() << "', should be " << *TypeType << "\n";
+ prettyWarning() << "unexpected argument type " << *ActualType << " at index " << utostr(i) << " in call to '" << F->getName() << "', should be " << *TypeType << "\n";
}
}
}
Type *TypeType = FT->getReturnType();
Type *ActualType = CI->getType();
if (getFunctionSignatureLetter(TypeType) != getFunctionSignatureLetter(ActualType)) {
- errs().changeColor(raw_ostream::YELLOW);
- errs() << "warning:";
- errs().resetColor();
- errs() << " unexpected return type " << *ActualType << " in call to '" << F->getName() << "', should be " << *TypeType << "\n";
+ prettyWarning() << "unexpected return type " << *ActualType << " in call to '" << F->getName() << "', should be " << *TypeType << "\n";
}
}
} else {