diff options
author | Nick Kledzik <kledzik@apple.com> | 2012-06-07 01:53:39 +0000 |
---|---|---|
committer | Nick Kledzik <kledzik@apple.com> | 2012-06-07 01:53:39 +0000 |
commit | 98211f6d19a1dece0d4b3749466ac0ed22ae7132 (patch) | |
tree | df1bde186b4c413f2e45d61640cba606983c0008 | |
parent | 40b86550823bb7d3ae4f3782efa892844b447fc5 (diff) | |
download | bcm5719-llvm-98211f6d19a1dece0d4b3749466ac0ed22ae7132.tar.gz bcm5719-llvm-98211f6d19a1dece0d4b3749466ac0ed22ae7132.zip |
fix warnings found after cranking up warnings
llvm-svn: 158134
-rw-r--r-- | lld/include/lld/Core/File.h | 1 | ||||
-rw-r--r-- | lld/include/lld/Core/Pass.h | 2 | ||||
-rw-r--r-- | lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp | 6 | ||||
-rw-r--r-- | lld/lib/ReaderWriter/YAML/ReaderYAML.cpp | 4 |
4 files changed, 9 insertions, 4 deletions
diff --git a/lld/include/lld/Core/File.h b/lld/include/lld/Core/File.h index e3afaeb5d03..8f81a9e7a9b 100644 --- a/lld/include/lld/Core/File.h +++ b/lld/include/lld/Core/File.h @@ -110,6 +110,7 @@ protected: template <typename T> class atom_collection { public: + virtual ~atom_collection() { } virtual atom_iterator<T> begin() const = 0; virtual atom_iterator<T> end() const = 0; virtual const T* deref(const void* it) const = 0; diff --git a/lld/include/lld/Core/Pass.h b/lld/include/lld/Core/Pass.h index 28859f0d3c1..6316f7e65d5 100644 --- a/lld/include/lld/Core/Pass.h +++ b/lld/include/lld/Core/Pass.h @@ -34,6 +34,8 @@ class DefinedAtom; /// class Pass { public: + virtual ~Pass() { } + /// Do the actual work of the Pass. virtual void perform(File& mergedFile) = 0; diff --git a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp index a43c8380c28..7c8bad655be 100644 --- a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp +++ b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp @@ -22,9 +22,10 @@ #include <map> #include <vector> -using namespace lld; using llvm::object::coff_symbol; +namespace lld { + class COFFAbsoluteAtom : public AbsoluteAtom { public: COFFAbsoluteAtom(const File &F, llvm::StringRef N, uint64_t V) @@ -376,9 +377,10 @@ private: }; - Reader* createReaderPECOFF(const ReaderOptionsPECOFF &options) { return new ReaderCOFF(options); } +} // namespace lld + diff --git a/lld/lib/ReaderWriter/YAML/ReaderYAML.cpp b/lld/lib/ReaderWriter/YAML/ReaderYAML.cpp index 8da77713698..f566da3d900 100644 --- a/lld/lib/ReaderWriter/YAML/ReaderYAML.cpp +++ b/lld/lib/ReaderWriter/YAML/ReaderYAML.cpp @@ -1197,9 +1197,9 @@ void YAMLState::parse(Node *node, StringRef keyword, Node *keywordNode) { } -/// parseObjectText - Parse the specified YAML formatted MemoryBuffer +/// parseFile - Parse the specified YAML formatted MemoryBuffer /// into lld::File object(s) and append each to the specified vector<File*>. -error_code parseFile(std::unique_ptr<MemoryBuffer> &mb, +static error_code parseFile(std::unique_ptr<MemoryBuffer> &mb, const ReaderOptionsYAML &options, std::vector<std::unique_ptr<File>> &result) { llvm::SourceMgr srcMgr; |