This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [COFF] Add and use a Wordsize field in Config. NFCI.
ClosedPublic

Authored by mstorsjo on Oct 11 2018, 9:50 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Oct 11 2018, 9:50 AM
ruiu added a comment.Oct 11 2018, 9:58 AM

lld/ELF has Config->Wordsize, so we should add the same variable to COFF.

mstorsjo updated this revision to Diff 169243.Oct 11 2018, 10:32 AM
mstorsjo retitled this revision from [LLD] [COFF] Factorize ptrSize to a common function in Config. NFCI. to [LLD] [COFF] Add and use a Wordsize field in Config. NFCI..

Made it into a variable named Wordsize.

ruiu accepted this revision.Oct 11 2018, 10:34 AM

LGTM

Thank you for doing this!

COFF/Config.h
87 ↗(On Diff #169243)

I wouldn't initialize it if the initial value will never be used.

This revision is now accepted and ready to land.Oct 11 2018, 10:34 AM
This revision was automatically updated to reflect the committed changes.