[PATCH] D60043: [FileCheck] Fix FileCheck.cpp compilation on Solaris
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 2 06:25:28 PDT 2019
ro updated this revision to Diff 193276.
ro added a comment.
Move `<cmath>` include to `FileCheck.cpp`.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60043/new/
https://reviews.llvm.org/D60043
Files:
utils/FileCheck/FileCheck.cpp
Index: utils/FileCheck/FileCheck.cpp
===================================================================
--- utils/FileCheck/FileCheck.cpp
+++ utils/FileCheck/FileCheck.cpp
@@ -21,6 +21,7 @@
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/FileCheck.h"
+#include <cmath>
using namespace llvm;
static cl::opt<std::string>
@@ -405,7 +406,7 @@
unsigned LineCount = InputFileText.count('\n');
if (InputFileEnd[-1] != '\n')
++LineCount;
- unsigned LineNoWidth = log10(LineCount) + 1;
+ unsigned LineNoWidth = std::log10(LineCount) + 1;
// +3 below adds spaces (1) to the left of the (right-aligned) line numbers
// on input lines and (2) to the right of the (left-aligned) labels on
// annotation lines so that input lines and annotation lines are more
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60043.193276.patch
Type: text/x-patch
Size: 825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190402/b7385d66/attachment.bin>
More information about the llvm-commits
mailing list