diff options
| author | Danil Malyshev <dmalyshev@accesssoftek.com> | 2012-04-10 01:54:44 +0000 |
|---|---|---|
| committer | Danil Malyshev <dmalyshev@accesssoftek.com> | 2012-04-10 01:54:44 +0000 |
| commit | 549515e12893e066f5bfb20de7b520cd1899b236 (patch) | |
| tree | 64dede0933246f4f4f8068725bf100c0e1ed2046 /llvm/lib/Object/MachOObjectFile.cpp | |
| parent | f8bad0800103edc86b61c5763aa72412b4f5b49a (diff) | |
| download | bcm5719-llvm-549515e12893e066f5bfb20de7b520cd1899b236.tar.gz bcm5719-llvm-549515e12893e066f5bfb20de7b520cd1899b236.zip | |
Add a constructor for DataRefImpl and remove excess initialization.
llvm-svn: 154371
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
| -rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 819409e3a14..ac90d5ccb4c 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -34,7 +34,6 @@ MachOObjectFile::MachOObjectFile(MemoryBuffer *Object, MachOObject *MOO, MachOObj(MOO), RegisteredStringTable(std::numeric_limits<uint32_t>::max()) { DataRefImpl DRI; - DRI.d.a = DRI.d.b = 0; moveToNextSection(DRI); uint32_t LoadCommandCount = MachOObj->getHeader().NumLoadCommands; while (DRI.d.a < LoadCommandCount) { @@ -355,7 +354,6 @@ error_code MachOObjectFile::getSymbolType(DataRefImpl Symb, symbol_iterator MachOObjectFile::begin_symbols() const { // DRI.d.a = segment number; DRI.d.b = symbol index. DataRefImpl DRI; - DRI.d.a = DRI.d.b = 0; moveToNextSymbol(DRI); return symbol_iterator(SymbolRef(DRI, this)); } @@ -363,7 +361,6 @@ symbol_iterator MachOObjectFile::begin_symbols() const { symbol_iterator MachOObjectFile::end_symbols() const { DataRefImpl DRI; DRI.d.a = MachOObj->getHeader().NumLoadCommands; - DRI.d.b = 0; return symbol_iterator(SymbolRef(DRI, this)); } @@ -601,7 +598,6 @@ error_code MachOObjectFile::sectionContainsSymbol(DataRefImpl Sec, relocation_iterator MachOObjectFile::getSectionRelBegin(DataRefImpl Sec) const { DataRefImpl ret; - ret.d.a = 0; ret.d.b = getSectionIndex(Sec); return relocation_iterator(RelocationRef(ret, this)); } @@ -624,7 +620,6 @@ relocation_iterator MachOObjectFile::getSectionRelEnd(DataRefImpl Sec) const { section_iterator MachOObjectFile::begin_sections() const { DataRefImpl DRI; - DRI.d.a = DRI.d.b = 0; moveToNextSection(DRI); return section_iterator(SectionRef(DRI, this)); } @@ -632,7 +627,6 @@ section_iterator MachOObjectFile::begin_sections() const { section_iterator MachOObjectFile::end_sections() const { DataRefImpl DRI; DRI.d.a = MachOObj->getHeader().NumLoadCommands; - DRI.d.b = 0; return section_iterator(SectionRef(DRI, this)); } @@ -708,7 +702,6 @@ error_code MachOObjectFile::getRelocationSymbol(DataRefImpl Rel, bool isExtern = (RE->Word1 >> 27) & 1; DataRefImpl Sym; - Sym.d.a = Sym.d.b = 0; moveToNextSymbol(Sym); if (isExtern) { for (unsigned i = 0; i < SymbolIdx; i++) { |

