aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/FileUtilities.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-01-29 14:42:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-01-29 14:42:22 +0000
commit5908839cedfa4cfb3b7a89db01f987c47e64aa90 (patch)
tree55d96f106b28db1edbe337b22034f6dd24affd53 /lib/Support/FileUtilities.cpp
parentf304ff63d334d80da82383e67963c0f1f73f67ed (diff)
downloadexternal_llvm-5908839cedfa4cfb3b7a89db01f987c47e64aa90.zip
external_llvm-5908839cedfa4cfb3b7a89db01f987c47e64aa90.tar.gz
external_llvm-5908839cedfa4cfb3b7a89db01f987c47e64aa90.tar.bz2
Convert some users of ftostr to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94808 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/FileUtilities.cpp')
-rw-r--r--lib/Support/FileUtilities.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Support/FileUtilities.cpp b/lib/Support/FileUtilities.cpp
index 21080b6..095395f 100644
--- a/lib/Support/FileUtilities.cpp
+++ b/lib/Support/FileUtilities.cpp
@@ -13,11 +13,11 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/FileUtilities.h"
-#include "llvm/System/Path.h"
#include "llvm/Support/MemoryBuffer.h"
+#include "llvm/Support/raw_ostream.h"
+#include "llvm/System/Path.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/StringExtras.h"
#include <cstdlib>
#include <cstring>
#include <cctype>
@@ -139,11 +139,11 @@ static bool CompareNumbers(const char *&F1P, const char *&F2P,
Diff = 0; // Both zero.
if (Diff > RelTolerance) {
if (ErrorMsg) {
- *ErrorMsg = "Compared: " + ftostr(V1) + " and " + ftostr(V2) + "\n";
- *ErrorMsg += "abs. diff = " + ftostr(std::abs(V1-V2)) +
- " rel.diff = " + ftostr(Diff) + "\n";
- *ErrorMsg += "Out of tolerance: rel/abs: " + ftostr(RelTolerance) +
- "/" + ftostr(AbsTolerance);
+ raw_string_ostream(*ErrorMsg)
+ << "Compared: " << V1 << " and " << V2 << '\n'
+ << "abs. diff = " << std::abs(V1-V2) << " rel.diff = " << Diff << '\n'
+ << "Out of tolerance: rel/abs: " << RelTolerance << '/'
+ << AbsTolerance;
}
return true;
}