[lld] r239717 - COFF: Use ulittle32_t::operator|=. NFC.
Rui Ueyama
ruiu at google.com
Sun Jun 14 20:03:23 PDT 2015
Author: ruiu
Date: Sun Jun 14 22:03:23 2015
New Revision: 239717
URL: http://llvm.org/viewvc/llvm-project?rev=239717&view=rev
Log:
COFF: Use ulittle32_t::operator|=. NFC.
Modified:
lld/trunk/COFF/Writer.cpp
Modified: lld/trunk/COFF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Writer.cpp?rev=239717&r1=239716&r2=239717&view=diff
==============================================================================
--- lld/trunk/COFF/Writer.cpp (original)
+++ lld/trunk/COFF/Writer.cpp Sun Jun 14 22:03:23 2015
@@ -84,7 +84,7 @@ void OutputSection::addChunk(Chunk *C) {
}
void OutputSection::addPermissions(uint32_t C) {
- Header.Characteristics = Header.Characteristics | (C & PermMask);
+ Header.Characteristics |= C & PermMask;
}
// Write the section header to a given buffer.
@@ -241,10 +241,10 @@ void Writer::writeHeader() {
Buf += sizeof(*COFF);
COFF->Machine = MachineType;
COFF->NumberOfSections = OutputSections.size();
- COFF->Characteristics =
- (IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_LARGE_ADDRESS_AWARE);
+ COFF->Characteristics = IMAGE_FILE_EXECUTABLE_IMAGE;
+ COFF->Characteristics |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
if (!Config->Relocatable)
- COFF->Characteristics = COFF->Characteristics | IMAGE_FILE_RELOCS_STRIPPED;
+ COFF->Characteristics |= IMAGE_FILE_RELOCS_STRIPPED;
COFF->SizeOfOptionalHeader =
sizeof(pe32plus_header) + sizeof(data_directory) * NumberfOfDataDirectory;
More information about the llvm-commits
mailing list