diff options
| author | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-11-02 19:33:26 +0000 |
|---|---|---|
| committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-11-02 19:33:26 +0000 |
| commit | d0f5b0e194e0ac5f5cf6b4dea506f4c67dfa9ba2 (patch) | |
| tree | 31fc20423989da529e96f325dabb8c187447ae69 /llvm/lib/Object | |
| parent | e03ea9cd71f031a1b4c42899e6a4c5e33cca500d (diff) | |
| download | bcm5719-llvm-d0f5b0e194e0ac5f5cf6b4dea506f4c67dfa9ba2.tar.gz bcm5719-llvm-d0f5b0e194e0ac5f5cf6b4dea506f4c67dfa9ba2.zip | |
object/COFF: Properly initalize uses of DataRefImpl.
llvm-svn: 143562
Diffstat (limited to 'llvm/lib/Object')
| -rw-r--r-- | llvm/lib/Object/COFFObjectFile.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index f19836b718a..7de51a43f33 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/lib/Object/COFFObjectFile.cpp @@ -284,6 +284,7 @@ error_code COFFObjectFile::getSymbolSection(DataRefImpl Symb, const coff_section *sec; if (error_code ec = getSection(symb->SectionNumber, sec)) return ec; DataRefImpl Sec; + std::memset(&Sec, 0, sizeof(Sec)); Sec.p = reinterpret_cast<uintptr_t>(sec); Result = section_iterator(SectionRef(Sec, this)); } @@ -618,6 +619,7 @@ error_code COFFObjectFile::getRelocationSymbol(DataRefImpl Rel, SymbolRef &Res) const { const coff_relocation* R = toRel(Rel); DataRefImpl Symb; + std::memset(&Symb, 0, sizeof(Symb)); Symb.p = reinterpret_cast<uintptr_t>(SymbolTable + R->SymbolTableIndex); Res = SymbolRef(Symb, this); return object_error::success; |

