[llvm-commits] [llvm] r143562 - /llvm/trunk/lib/Object/COFFObjectFile.cpp
Michael J. Spencer
bigcheesegs at gmail.com
Wed Nov 2 12:33:27 PDT 2011
Author: mspencer
Date: Wed Nov 2 14:33:26 2011
New Revision: 143562
URL: http://llvm.org/viewvc/llvm-project?rev=143562&view=rev
Log:
object/COFF: Properly initalize uses of DataRefImpl.
Modified:
llvm/trunk/lib/Object/COFFObjectFile.cpp
Modified: llvm/trunk/lib/Object/COFFObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFObjectFile.cpp?rev=143562&r1=143561&r2=143562&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFObjectFile.cpp Wed Nov 2 14:33:26 2011
@@ -284,6 +284,7 @@
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 @@
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;
More information about the llvm-commits
mailing list