[lld] r317013 - Remove a redundant union member.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 31 10:07:47 PDT 2017
Author: ruiu
Date: Tue Oct 31 10:07:47 2017
New Revision: 317013
URL: http://llvm.org/viewvc/llvm-project?rev=317013&view=rev
Log:
Remove a redundant union member.
This removes DefinedCOFF from SymbolUnion because DefinedCOFF is
not a leaf class. Pointed out by pcc.
Modified:
lld/trunk/COFF/Symbols.h
Modified: lld/trunk/COFF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Symbols.h?rev=317013&r1=317012&r2=317013&view=diff
==============================================================================
--- lld/trunk/COFF/Symbols.h (original)
+++ lld/trunk/COFF/Symbols.h Tue Oct 31 10:07:47 2017
@@ -403,16 +403,15 @@ inline Chunk *Defined::getChunk() {
// object. We allocate memory using this class and instantiate a symbol
// using the placement new.
union SymbolUnion {
- alignas(DefinedCOFF) char A[sizeof(DefinedCOFF)];
- alignas(DefinedRegular) char B[sizeof(DefinedRegular)];
- alignas(DefinedCommon) char C[sizeof(DefinedCommon)];
- alignas(DefinedAbsolute) char D[sizeof(DefinedAbsolute)];
- alignas(DefinedSynthetic) char E[sizeof(DefinedSynthetic)];
- alignas(Lazy) char F[sizeof(Lazy)];
- alignas(Undefined) char G[sizeof(Undefined)];
- alignas(DefinedImportData) char H[sizeof(DefinedImportData)];
- alignas(DefinedImportThunk) char I[sizeof(DefinedImportThunk)];
- alignas(DefinedLocalImport) char J[sizeof(DefinedLocalImport)];
+ alignas(DefinedRegular) char A[sizeof(DefinedRegular)];
+ alignas(DefinedCommon) char B[sizeof(DefinedCommon)];
+ alignas(DefinedAbsolute) char C[sizeof(DefinedAbsolute)];
+ alignas(DefinedSynthetic) char D[sizeof(DefinedSynthetic)];
+ alignas(Lazy) char E[sizeof(Lazy)];
+ alignas(Undefined) char F[sizeof(Undefined)];
+ alignas(DefinedImportData) char G[sizeof(DefinedImportData)];
+ alignas(DefinedImportThunk) char H[sizeof(DefinedImportThunk)];
+ alignas(DefinedLocalImport) char I[sizeof(DefinedLocalImport)];
};
template <typename T, typename... ArgT>
More information about the llvm-commits
mailing list