Make the absolute/relative tolerance information easier to read/understand.
llvm-svn: 31908
diff --git a/llvm/lib/Support/FileUtilities.cpp b/llvm/lib/Support/FileUtilities.cpp
index ea7822a..adee22d 100644
--- a/llvm/lib/Support/FileUtilities.cpp
+++ b/llvm/lib/Support/FileUtilities.cpp
@@ -106,8 +106,9 @@
Diff = 0; // Both zero.
if (Diff > RelTolerance) {
if (ErrorMsg) {
- *ErrorMsg = "Compared: " + ftostr(V1) + " and " + ftostr(V2) +
- ": diff = " + ftostr(Diff) + "\n";
+ *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);
}