forked from OSchip/llvm-project
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:
parent
6668b5a8b8
commit
009f91a9ee
|
@ -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));
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue