[llvm] r308360 - llvm: fix -Wcast gcc warn error from rL308329
Martell Malone via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 13:58:21 PDT 2017
Author: martell
Date: Tue Jul 18 13:58:21 2017
New Revision: 308360
URL: http://llvm.org/viewvc/llvm-project?rev=308360&view=rev
Log:
llvm: fix -Wcast gcc warn error from rL308329
Modified:
llvm/trunk/lib/Object/COFFImportFile.cpp
Modified: llvm/trunk/lib/Object/COFFImportFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/COFFImportFile.cpp?rev=308360&r1=308359&r2=308360&view=diff
==============================================================================
--- llvm/trunk/lib/Object/COFFImportFile.cpp (original)
+++ llvm/trunk/lib/Object/COFFImportFile.cpp Tue Jul 18 13:58:21 2017
@@ -539,18 +539,15 @@ NewArchiveMember ObjectFactory::createWe
1},
{{{2, 0, 0, 0, 3, 0, 0, 0}}, u32(0), u16(0), u16(0), uint8_t(0), 0},
};
- reinterpret_cast<StringTableOffset &>(SymbolTable[2].Name).Offset =
- sizeof(uint32_t);
+ SymbolTable[2].Name.Offset.Offset = sizeof(uint32_t);
//__imp_ String Table
if (Imp) {
- reinterpret_cast<StringTableOffset &>(SymbolTable[3].Name).Offset =
- sizeof(uint32_t) + Sym.size() + 1 + 6;
+ SymbolTable[3].Name.Offset.Offset = sizeof(uint32_t) + Sym.size() + 7;
writeStringTable(Buffer, {std::string("__imp_").append(Sym),
std::string("__imp_").append(Weak)});
} else {
- reinterpret_cast<StringTableOffset &>(SymbolTable[3].Name).Offset =
- sizeof(uint32_t) + Sym.size() + 1;
+ SymbolTable[3].Name.Offset.Offset = sizeof(uint32_t) + Sym.size() + 1;
writeStringTable(Buffer, {Sym, Weak});
}
append(Buffer, SymbolTable);
More information about the llvm-commits
mailing list