[lld] r291835 - Do not use the same name for both a class and a variable.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 13:44:21 PST 2017


Author: ruiu
Date: Thu Jan 12 15:44:20 2017
New Revision: 291835

URL: http://llvm.org/viewvc/llvm-project?rev=291835&view=rev
Log:
Do not use the same name for both a class and a variable.

Modified:
    lld/trunk/ELF/InputSection.cpp

Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=291835&r1=291834&r2=291835&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Thu Jan 12 15:44:20 2017
@@ -130,11 +130,11 @@ typename ELFT::uint InputSectionBase<ELF
 // Uncompress section contents. Note that this function is called
 // from parallel_for_each, so it must be thread-safe.
 template <class ELFT> void InputSectionBase<ELFT>::uncompress() {
-  Decompressor Decompressor = check(Decompressor::create(
+  Decompressor Dec = check(Decompressor::create(
       Name, toStringRef(Data), ELFT::TargetEndianness == llvm::support::little,
       ELFT::Is64Bits));
 
-  size_t Size = Decompressor.getDecompressedSize();
+  size_t Size = Dec.getDecompressedSize();
   char *OutputBuf;
   {
     static std::mutex Mu;
@@ -142,7 +142,7 @@ template <class ELFT> void InputSectionB
     OutputBuf = BAlloc.Allocate<char>(Size);
   }
 
-  if (Error E = Decompressor.decompress({OutputBuf, Size}))
+  if (Error E = Dec.decompress({OutputBuf, Size}))
     fatal(toString(this) +
           ": decompress failed: " + llvm::toString(std::move(E)));
   Data = ArrayRef<uint8_t>((uint8_t *)OutputBuf, Size);




More information about the llvm-commits mailing list