Fix alignment complaint.

Summary: Apparently we need to write using a void* pointer on some architectures, or else alignment error is caused.

Subscribers: hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D34166

llvm-svn: 305320
This commit is contained in:
Eric Beckmann 2017-06-13 20:36:19 +00:00
parent 4ebb0f061a
commit 338663348a
1 changed files with 2 additions and 3 deletions

View File

@ -598,9 +598,8 @@ void WindowsResourceCOFFWriter::writeSymbolTable() {
void WindowsResourceCOFFWriter::writeStringTable() {
// Just 4 null bytes for the string table.
auto COFFStringTable =
reinterpret_cast<uint32_t *>(BufferStart + CurrentOffset);
*COFFStringTable = 0;
auto COFFStringTable = reinterpret_cast<void *>(BufferStart + CurrentOffset);
memset(COFFStringTable, 0, 4);
}
void WindowsResourceCOFFWriter::writeDirectoryTree() {