Use numeric_limits instead of LLONG_MAX

This is a build fix for configurations where LLONG_MAX is
not defined in system headers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250946 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matt Arsenault 2015-10-21 21:10:12 +00:00
parent bcb3afc5fb
commit 8a10a4556b

View File

@ -18,7 +18,7 @@
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <climits>
#include <limits>
using namespace llvm;
using namespace dwarf;
using namespace syntax;
@ -565,7 +565,7 @@ Optional<uint64_t> DWARFFormValue::getAsUnsignedConstant() const {
Optional<int64_t> DWARFFormValue::getAsSignedConstant() const {
if ((!isFormClass(FC_Constant) && !isFormClass(FC_Flag)) ||
(Form == DW_FORM_udata && uint64_t(LLONG_MAX) < Value.uval))
(Form == DW_FORM_udata && uint64_t(std::numeric_limits<int64_t>::max()) < Value.uval))
return None;
switch (Form) {
case DW_FORM_data4: