This is an archive of the discontinued LLVM Phabricator instance.

ELF2: Simplify by removing temporary variables
ClosedPublic

Authored by ruiu on Sep 14 2015, 4:58 PM.

Details

Reviewers
rafael
Summary

No functionality change intended.

Diff Detail

Event Timeline

ruiu updated this revision to Diff 34758.Sep 14 2015, 4:58 PM
ruiu retitled this revision from to ELF2: Simplify by removing temporary variables.
ruiu updated this object.
ruiu added a reviewer: rafael.
ruiu added a subscriber: llvm-commits.
rafael accepted this revision.Sep 14 2015, 5:34 PM
rafael edited edge metadata.

LGTM.

The new version is writing directly to mmaped memory. It is also using a type that in unaligned and may have non-native endian.

But this is code that will likely be revisited once we can link something large enough to benchmark, so yes, lets keep the simpler version for now.

This revision is now accepted and ready to land.Sep 14 2015, 5:34 PM
ruiu added a subscriber: ruiu.Sep 14 2015, 5:39 PM

That's really good point, we probably should use ulittle32_t instead.
Regarding alignment, don't we guarantee that the in-memory object we are
building aligned properly?

Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in r247652.