[llvm-commits] [dragonegg] r128711 - in /dragonegg/trunk: Debug.cpp Types.cpp

Duncan Sands baldrick at free.fr
Fri Apr 1 06:31:01 PDT 2011


Author: baldrick
Date: Fri Apr  1 08:31:01 2011
New Revision: 128711

URL: http://llvm.org/viewvc/llvm-project?rev=128711&view=rev
Log:
No need to check that the value is not null: isInt64 checks this (and
returns false if it is null).

Modified:
    dragonegg/trunk/Debug.cpp
    dragonegg/trunk/Types.cpp

Modified: dragonegg/trunk/Debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Debug.cpp?rev=128711&r1=128710&r2=128711&view=diff
==============================================================================
--- dragonegg/trunk/Debug.cpp (original)
+++ dragonegg/trunk/Debug.cpp Fri Apr  1 08:31:01 2011
@@ -646,9 +646,9 @@
       tree MaxValue = TYPE_MAX_VALUE(Domain);
       uint64_t Low = 0;
       uint64_t Hi = 0;
-      if (MinValue && isInt64(MinValue, 0))
+      if (isInt64(MinValue, false))
         Low = getINTEGER_CSTVal(MinValue);
-      if (MaxValue && isInt64(MaxValue, 0))
+      if (isInt64(MaxValue, false))
         Hi = getINTEGER_CSTVal(MaxValue);
       Subscripts.push_back(DebugFactory.GetOrCreateSubrange(Low, Hi));
     }

Modified: dragonegg/trunk/Types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Types.cpp?rev=128711&r1=128710&r2=128711&view=diff
==============================================================================
--- dragonegg/trunk/Types.cpp (original)
+++ dragonegg/trunk/Types.cpp Fri Apr  1 08:31:01 2011
@@ -70,7 +70,7 @@
   // variable size, that the LLVM type is not bigger than any possible value of
   // the GCC type.
 #ifndef NDEBUG
-  if (TYPE_SIZE(Tr) && Ty->isSized() && isInt64(TYPE_SIZE(Tr), true)) {
+  if (Ty->isSized() && isInt64(TYPE_SIZE(Tr), true)) {
     uint64_t LLVMSize = getTargetData().getTypeAllocSizeInBits(Ty);
     if (getInt64(TYPE_SIZE(Tr), true) != LLVMSize) {
       errs() << "GCC: ";





More information about the llvm-commits mailing list