Don't return error_code from a function that doesn't fail.
[oota-llvm.git] / utils / fpcmp / fpcmp.cpp
index d7808dd6f006cb3663534da76a0b366af53b1fcf..bbe7276e13a0d428895e7d381758c864afdc81d6 100644 (file)
@@ -1,10 +1,10 @@
 //===- fpcmp.cpp - A fuzzy "cmp" that permits floating point noise --------===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
 //===----------------------------------------------------------------------===//
 //
 // fpcmp is a tool that basically works like the 'cmp' tool, except that it can
@@ -14,7 +14,7 @@
 
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/FileUtilities.h"
-#include <iostream>
+#include "llvm/Support/raw_ostream.h"
 using namespace llvm;
 
 namespace {
@@ -36,7 +36,7 @@ int main(int argc, char **argv) {
   int DF = DiffFilesWithTolerance(File1, File2, AbsTolerance, RelTolerance,
                                   &ErrorMsg);
   if (!ErrorMsg.empty())
-    std::cerr << argv[0] << ": " << ErrorMsg << "\n";
+    errs() << argv[0] << ": " << ErrorMsg << "\n";
   return DF;
 }