aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-07-25 06:57:31 +0000
committerFangrui Song <maskray@google.com>2018-07-25 06:57:31 +0000
commit1231be927ba509ec8e1a31f9322529748daebf94 (patch)
tree394053e95edb2e6b3dc890392b1223f3c63dce0d /tools
parent1df8e57db9c247fc74542ce89cf0e90ec1d0881f (diff)
downloadclang-1231be927ba509ec8e1a31f9322529748daebf94.tar.gz
cc1_main: fix -Wsign-compare on FreeBSD
Its __rlim_t is intentionally signed (__int64_t) because of legacy code that uses -1 for RLIM_INFINITY. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/driver/cc1_main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/driver/cc1_main.cpp b/tools/driver/cc1_main.cpp
index 952b1c1c0d..ef5a191bda 100644
--- a/tools/driver/cc1_main.cpp
+++ b/tools/driver/cc1_main.cpp
@@ -140,9 +140,11 @@ static void ensureSufficientStack() {
// Increase the soft stack limit to our desired level, if necessary and
// possible.
- if (rlim.rlim_cur != RLIM_INFINITY && rlim.rlim_cur < DesiredStackSize) {
+ if (rlim.rlim_cur != RLIM_INFINITY &&
+ rlim.rlim_cur < rlim_t(DesiredStackSize)) {
// Try to allocate sufficient stack.
- if (rlim.rlim_max == RLIM_INFINITY || rlim.rlim_max >= DesiredStackSize)
+ if (rlim.rlim_max == RLIM_INFINITY ||
+ rlim.rlim_max >= rlim_t(DesiredStackSize))
rlim.rlim_cur = DesiredStackSize;
else if (rlim.rlim_cur == rlim.rlim_max)
return;