[PATCH] D11430: Use numeric_limits instead of LLONG_MAX

Matt Arsenault Matthew.Arsenault at amd.com
Wed Jul 22 14:31:10 PDT 2015


arsenm created this revision.
arsenm added a subscriber: llvm-commits.

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


http://reviews.llvm.org/D11430

Files:
  lib/DebugInfo/DWARF/DWARFFormValue.cpp

Index: lib/DebugInfo/DWARF/DWARFFormValue.cpp
===================================================================
--- lib/DebugInfo/DWARF/DWARFFormValue.cpp
+++ lib/DebugInfo/DWARF/DWARFFormValue.cpp
@@ -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<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:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11430.30402.patch
Type: text/x-patch
Size: 794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150722/b656ddf4/attachment.bin>


More information about the llvm-commits mailing list