Replace SimpleFileWrapper with a function.
authorRui Ueyama <ruiu@google.com>
Fri, 30 Jan 2015 02:11:59 +0000 (02:11 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 30 Jan 2015 02:11:59 +0000 (02:11 +0000)
commit78e2a2df22a40a7ed097ab64e4bf70833d115ed3
tree74e824e5897a2451e59a59e4eb3916557f45dd3f
parent38522b8867bacc6cd6714d538ff0caf3c86656da
Replace SimpleFileWrapper with a function.

SimpleFileWrapper was a class to wrap an existing (possibly non-mutable)
file as a mutable file. We used instances of the class in RoundTrip*
passes, because the passes convert mutable files to non-mutable files,
and we needed to convert them back to mutable.

That feature can be implemented without defining a new class. Generally
speaking, if we can implement a feature without defining a class and
using only public interface of exsiting classes, that's preferred way
to do that. And this is the case.

llvm-svn: 227549
lld/include/lld/Core/Simple.h
lld/lib/Passes/RoundTripNativePass.cpp
lld/lib/Passes/RoundTripYAMLPass.cpp