Rename FileToMutable -> SimpleFileWrapper.
authorRui Ueyama <ruiu@google.com>
Tue, 3 Jun 2014 08:12:33 +0000 (08:12 +0000)
committerRui Ueyama <ruiu@google.com>
Tue, 3 Jun 2014 08:12:33 +0000 (08:12 +0000)
FileToMutable is what this class does, but this class (or, to be precise,
an instance of this class) is a wrapper of the other SimpleFile. It's odd
that the class was named like a function.

llvm-svn: 210089

lld/include/lld/ReaderWriter/Simple.h
lld/lib/Passes/RoundTripNativePass.cpp
lld/lib/Passes/RoundTripYAMLPass.cpp

index 03e8783..58bab73 100644 (file)
@@ -66,9 +66,9 @@ protected:
   atom_collection_vector<AbsoluteAtom>       _absoluteAtoms;
 };
 
-class FileToMutable : public SimpleFile {
+class SimpleFileWrapper : public SimpleFile {
 public:
-  FileToMutable(const LinkingContext &context, const File &file)
+  SimpleFileWrapper(const LinkingContext &context, const File &file)
       : SimpleFile(file.path()) {
     for (auto definedAtom : file.defined())
       _definedAtoms._atoms.push_back(std::move(definedAtom));
index 42e22d4..724baad 100644 (file)
@@ -47,7 +47,7 @@ void RoundTripNativePass::perform(std::unique_ptr<MutableFile> &mergedFile) {
     llvm_unreachable("native reader not registered or read error");
   }
   File *objFile = _nativeFile[0].get();
-  mergedFile.reset(new FileToMutable(_context, *objFile));
+  mergedFile.reset(new SimpleFileWrapper(_context, *objFile));
 
   llvm::sys::fs::remove(tmpNativeFile.str());
 }
index a01753a..ba9926a 100644 (file)
@@ -46,6 +46,6 @@ void RoundTripYAMLPass::perform(std::unique_ptr<MutableFile> &mergedFile) {
     llvm_unreachable("yaml reader not registered or read error");
   }
   File *objFile = _yamlFile[0].get();
-  mergedFile.reset(new FileToMutable(_context, *objFile));
+  mergedFile.reset(new SimpleFileWrapper(_context, *objFile));
   llvm::sys::fs::remove(tmpYAMLFile.str());
 }