[llvm-commits] [lld] r163573 - in /lld/trunk: lib/ReaderWriter/ELF/ReaderELF.cpp lib/ReaderWriter/Native/ReaderNative.cpp lib/ReaderWriter/Native/WriterNative.cpp lib/ReaderWriter/PECOFF/ReaderCOFF.cpp lib/ReaderWriter/YAML/ReaderYAML.cpp tools/lld-core/TestingHelpers.hpp

Michael J. Spencer bigcheesegs at gmail.com
Mon Sep 10 16:46:58 PDT 2012


Author: mspencer
Date: Mon Sep 10 18:46:58 2012
New Revision: 163573

URL: http://llvm.org/viewvc/llvm-project?rev=163573&view=rev
Log:
Fix warnings.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/ReaderELF.cpp
    lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp
    lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp
    lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
    lld/trunk/lib/ReaderWriter/YAML/ReaderYAML.cpp
    lld/trunk/tools/lld-core/TestingHelpers.hpp

Modified: lld/trunk/lib/ReaderWriter/ELF/ReaderELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ReaderELF.cpp?rev=163573&r1=163572&r2=163573&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ReaderELF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ReaderELF.cpp Mon Sep 10 18:46:58 2012
@@ -492,9 +492,7 @@
 
 class ReaderELF: public Reader {
 public:
-  ReaderELF(const ReaderOptionsELF &options) :
-    _options(options) {
-  }
+  ReaderELF(const ReaderOptionsELF &) {}
   error_code parseFile(std::unique_ptr<MemoryBuffer> mb, std::vector<
       std::unique_ptr<File> > &result) {
 
@@ -531,8 +529,6 @@
     result.push_back(std::move(f));
     return error_code::success();
   }
-private:
-  const ReaderOptionsELF &_options;
 };
 
 } // namespace anonymous

Modified: lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp?rev=163573&r1=163572&r2=163573&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp Mon Sep 10 18:46:58 2012
@@ -896,16 +896,12 @@
 
 class Reader : public lld::Reader {
 public:
-  Reader(const ReaderOptionsNative &options) : _options(options) {
-  }
+  Reader(const ReaderOptionsNative &options) {}
   
   virtual error_code parseFile(std::unique_ptr<MemoryBuffer> mb, 
                                std::vector<std::unique_ptr<lld::File>> &result) {
     return File::make(mb, mb->getBufferIdentifier(), result);
   }
-
-private:
-  const ReaderOptionsNative &_options;
 };
 
 

Modified: lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp?rev=163573&r1=163572&r2=163573&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp Mon Sep 10 18:46:58 2012
@@ -28,8 +28,7 @@
 ///
 class Writer : public lld::Writer {
 public:
-  Writer(const WriterOptionsNative &options) : _options(options) {
-  }
+  Writer(const WriterOptionsNative &options) {}
   
   virtual error_code writeFile(const lld::File &file, StringRef outPath) {
     // reserve first byte for unnamed atoms
@@ -523,7 +522,6 @@
   typedef llvm::DenseMap<const Atom*, uint32_t> TargetToIndex;
   typedef llvm::DenseMap<Reference::Addend, uint32_t> AddendToIndex;
 
-  const WriterOptionsNative              &_options;
   NativeFileHeader*                       _headerBuffer;
   size_t                                  _headerBufferSize;
   std::vector<char>                       _stringPool;

Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=163573&r1=163572&r2=163573&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp Mon Sep 10 18:46:58 2012
@@ -359,8 +359,7 @@
 
 class ReaderCOFF : public Reader {
 public:
-  ReaderCOFF(const ReaderOptionsPECOFF &options) : _options(options) {
-  }
+  ReaderCOFF(const ReaderOptionsPECOFF &options) {}
 
   error_code parseFile(std::unique_ptr<MemoryBuffer> mb,
                        std::vector<std::unique_ptr<File>> &result) {
@@ -373,8 +372,6 @@
     result.push_back(std::move(f));
     return error_code::success();
   }
-private:
-  const ReaderOptionsPECOFF &_options;
 };
 
 } // namespace anonymous

Modified: lld/trunk/lib/ReaderWriter/YAML/ReaderYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/YAML/ReaderYAML.cpp?rev=163573&r1=163572&r2=163573&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/YAML/ReaderYAML.cpp (original)
+++ lld/trunk/lib/ReaderWriter/YAML/ReaderYAML.cpp Mon Sep 10 18:46:58 2012
@@ -345,12 +345,11 @@
 class YAMLUndefinedAtom : public UndefinedAtom {
 public:
   YAMLUndefinedAtom( YAMLFile &f
-                   , int32_t ord
+                   , int32_t
                    , StringRef name
                    , UndefinedAtom::CanBeNull cbn)
     : _file(f)
     , _name(name)
-    , _ordinal(ord)
     , _canBeNull(cbn) {
   }
 
@@ -369,7 +368,6 @@
 private:
   YAMLFile                &_file;
   StringRef                _name;
-  uint32_t                 _ordinal;
   UndefinedAtom::CanBeNull _canBeNull;
 };
 
@@ -381,13 +379,12 @@
 class YAMLSharedLibraryAtom : public SharedLibraryAtom {
 public:
   YAMLSharedLibraryAtom( YAMLFile &f
-                       , int32_t ord
+                       , int32_t
                        , StringRef name
                        , StringRef loadName
                        , bool cbn)
     : _file(f)
     , _name(name)
-    , _ordinal(ord)
     , _loadName(loadName)
     , _canBeNull(cbn) {
   }
@@ -411,7 +408,6 @@
 private:
   YAMLFile &_file;
   StringRef _name;
-  uint32_t  _ordinal;
   StringRef _loadName;
   bool      _canBeNull;
 };
@@ -423,10 +419,9 @@
 ///
 class YAMLAbsoluteAtom : public AbsoluteAtom {
 public:
-  YAMLAbsoluteAtom(YAMLFile &f, int32_t ord, StringRef name, uint64_t v)
+  YAMLAbsoluteAtom(YAMLFile &f, int32_t, StringRef name, uint64_t v)
     : _file(f)
     , _name(name)
-    , _ordinal(ord)
     , _value(v) {
   }
 
@@ -445,7 +440,6 @@
 private:
   YAMLFile &_file;
   StringRef _name;
-  uint32_t  _ordinal;
   uint64_t  _value;
 };
 

Modified: lld/trunk/tools/lld-core/TestingHelpers.hpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/tools/lld-core/TestingHelpers.hpp?rev=163573&r1=163572&r2=163573&view=diff
==============================================================================
--- lld/trunk/tools/lld-core/TestingHelpers.hpp (original)
+++ lld/trunk/tools/lld-core/TestingHelpers.hpp Mon Sep 10 18:46:58 2012
@@ -35,11 +35,10 @@
 //
 class TestingStubAtom : public DefinedAtom {
 public:
-        TestingStubAtom(const File& f, const Atom& shlib) :
-                        _file(f), _shlib(shlib) {
-          static uint32_t lastOrdinal = 0;
-          _ordinal = lastOrdinal++; 
-        }
+  TestingStubAtom(const File &F, const Atom&) : _file(F) {
+    static uint32_t lastOrdinal = 0;
+    _ordinal = lastOrdinal++; 
+  }
 
   virtual const File& file() const {
     return _file;
@@ -122,7 +121,6 @@
   
 private:
   const File&               _file;
-  const Atom&               _shlib;
   uint32_t                  _ordinal;
 };
 
@@ -134,11 +132,10 @@
 //
 class TestingGOTAtom : public DefinedAtom {
 public:
-        TestingGOTAtom(const File& f, const Atom& shlib) :
-                        _file(f), _shlib(shlib) {
-          static uint32_t lastOrdinal = 0;
-          _ordinal = lastOrdinal++; 
-        }
+  TestingGOTAtom(const File &F, const Atom&) : _file(F) {
+    static uint32_t lastOrdinal = 0;
+    _ordinal = lastOrdinal++; 
+  }
 
   virtual const File& file() const {
     return _file;
@@ -221,7 +218,6 @@
   
 private:
   const File&               _file;
-  const Atom&               _shlib;
   uint32_t                  _ordinal;
 };
 





More information about the llvm-commits mailing list