[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 01:56:19 PDT 2019
ro updated this revision to Diff 193243.
ro added a comment.
Herald added a subscriber: kristina.
Revised patch.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60043/new/
https://reviews.llvm.org/D60043
Files:
include/llvm/Support/FileCheck.h
utils/FileCheck/FileCheck.cpp
Index: utils/FileCheck/FileCheck.cpp
===================================================================
--- utils/FileCheck/FileCheck.cpp
+++ utils/FileCheck/FileCheck.cpp
@@ -405,7 +405,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
Index: include/llvm/Support/FileCheck.h
===================================================================
--- include/llvm/Support/FileCheck.h
+++ include/llvm/Support/FileCheck.h
@@ -19,6 +19,7 @@
#include "llvm/Support/SourceMgr.h"
#include <vector>
#include <map>
+#include <cmath>
namespace llvm {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60043.193243.patch
Type: text/x-patch
Size: 934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190402/672a3e88/attachment.bin>
More information about the llvm-commits
mailing list