[lld] r270388 - Simplify. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sun May 22 18:31:14 PDT 2016
Author: ruiu
Date: Sun May 22 20:31:10 2016
New Revision: 270388
URL: http://llvm.org/viewvc/llvm-project?rev=270388&view=rev
Log:
Simplify. NFC.
Modified:
lld/trunk/ELF/OutputSections.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=270388&r1=270387&r2=270388&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Sun May 22 20:31:10 2016
@@ -768,11 +768,11 @@ template <class ELFT> void EhFrameHeader
for (const FdeData &F : FdeList)
PcToOffset[getFdePc(EhVA, F)] = F.Off;
- const uint8_t Header[] = {1, DW_EH_PE_pcrel | DW_EH_PE_sdata4,
- DW_EH_PE_udata4,
- DW_EH_PE_datarel | DW_EH_PE_sdata4};
- memcpy(Buf, Header, sizeof(Header));
-
+ // Write a header.
+ Buf[0] = 1;
+ Buf[1] = DW_EH_PE_pcrel | DW_EH_PE_sdata4;
+ Buf[2] = DW_EH_PE_udata4;
+ Buf[3] = DW_EH_PE_datarel | DW_EH_PE_sdata4;
uintX_t EhOff = EhVA - VA - 4;
write32<E>(Buf + 4, EhOff);
write32<E>(Buf + 8, PcToOffset.size());
More information about the llvm-commits
mailing list