[llvm] r185709 - Remove a useless declarations (found by scan-build)

Sylvestre Ledru sylvestre at debian.org
Fri Jul 5 08:58:12 PDT 2013


Author: sylvestre
Date: Fri Jul  5 10:58:12 2013
New Revision: 185709

URL: http://llvm.org/viewvc/llvm-project?rev=185709&view=rev
Log:
Remove a useless declarations (found by scan-build)

Modified:
    llvm/trunk/lib/Object/Archive.cpp
    llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp

Modified: llvm/trunk/lib/Object/Archive.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Archive.cpp?rev=185709&r1=185708&r2=185709&view=diff
==============================================================================
--- llvm/trunk/lib/Object/Archive.cpp (original)
+++ llvm/trunk/lib/Object/Archive.cpp Fri Jul  5 10:58:12 2013
@@ -294,7 +294,6 @@ Archive::symbol_iterator Archive::end_sy
   uint32_t symbol_count = 0;
   if (kind() == K_GNU) {
     symbol_count = *reinterpret_cast<const support::ubig32_t*>(buf);
-    buf += sizeof(uint32_t) + (symbol_count * (sizeof(uint32_t)));
   } else if (kind() == K_BSD) {
     llvm_unreachable("BSD archive format is not supported");
   } else {

Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=185709&r1=185708&r2=185709&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Fri Jul  5 10:58:12 2013
@@ -868,7 +868,6 @@ void ExtAddrMode::print(raw_ostream &OS)
     OS << (NeedPlus ? " + " : "")
        << Scale << "*";
     WriteAsOperand(OS, ScaledReg, /*PrintType=*/false);
-    NeedPlus = true;
   }
 
   OS << ']';





More information about the llvm-commits mailing list