mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-03 08:51:43 +00:00
[llvm-objcopy] Remove unused field from Object
The class Object contains std::shared_ptr<MemoryBuffer> OwnedData which is not used anywhere. Besides avoiding two stage initialization the motivation to remove it comes from the plan to add (currently missing) support for static libraries. NFC. Test plan: make check-all Differential revision: https://reviews.llvm.org/D47855 llvm-svn: 334217
This commit is contained in:
parent
bc783fddef
commit
15f4a16453
@ -835,7 +835,7 @@ ElfType ELFReader::getElfType() const {
|
||||
}
|
||||
|
||||
std::unique_ptr<Object> ELFReader::create() const {
|
||||
auto Obj = llvm::make_unique<Object>(Data);
|
||||
auto Obj = llvm::make_unique<Object>();
|
||||
if (auto *o = dyn_cast<ELFObjectFile<ELF32LE>>(Bin.get())) {
|
||||
ELFBuilder<ELF32LE> Builder(*o, *Obj);
|
||||
Builder.build();
|
||||
|
@ -584,7 +584,6 @@ private:
|
||||
using SecPtr = std::unique_ptr<SectionBase>;
|
||||
using SegPtr = std::unique_ptr<Segment>;
|
||||
|
||||
std::shared_ptr<MemoryBuffer> OwnedData;
|
||||
std::vector<SecPtr> Sections;
|
||||
std::vector<SegPtr> Segments;
|
||||
|
||||
@ -617,10 +616,6 @@ public:
|
||||
StringTableSection *SectionNames = nullptr;
|
||||
SymbolTableSection *SymbolTable = nullptr;
|
||||
|
||||
explicit Object(std::shared_ptr<MemoryBuffer> Data)
|
||||
: OwnedData(std::move(Data)) {}
|
||||
virtual ~Object() = default;
|
||||
|
||||
void sortSections();
|
||||
SectionTableRef sections() { return SectionTableRef(Sections); }
|
||||
ConstRange<SectionBase> sections() const {
|
||||
|
Loading…
Reference in New Issue
Block a user