Rename FileToMutable -> SimpleFileWrapper.

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
This commit is contained in:
Rui Ueyama 2014-06-03 08:12:33 +00:00
parent 6668b5a8b8
commit 009f91a9ee
3 changed files with 4 additions and 4 deletions

View 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));

View 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());
}

View 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());
}