This is an archive of the discontinued LLVM Phabricator instance.

Simplified WebAssemblyAsmBackend by removing explicit ELF variant.
ClosedPublic

Authored by aardappel on Jun 4 2018, 3:01 PM.

Details

Summary

The ELF version was broken (does not deal with wasm specific fixups),
and now is slightly less broken. It will be removed in its entirety
in the future which this change makes slightly easier (just remove
the IsELF bool).

Diff Detail

Repository
rL LLVM

Event Timeline

aardappel created this revision.Jun 4 2018, 3:01 PM
sbc100 accepted this revision.Jun 4 2018, 3:15 PM
sbc100 added inline comments.
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp
125 ↗(On Diff #149860)

IIRC we could probably abort here in the elf case as I think ELF is only used to produce .s format files, not object files.

I guess that might be a separate/larger change so this LGTM as is keep the change small.

This revision is now accepted and ready to land.Jun 4 2018, 3:15 PM
dschuff accepted this revision.Jun 4 2018, 3:17 PM

LGTM, we can remove any code relating to binary output with the ELF triple now. Hopefully not much longer before we can remove the ELF triple entirely.

dschuff added inline comments.Jun 4 2018, 3:18 PM
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp
125 ↗(On Diff #149860)

Yeah we should be able to remove the ELF object writer too.

aardappel added inline comments.Jun 4 2018, 3:20 PM
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp
125 ↗(On Diff #149860)

Yes, I was going to fix ELF behavior until Derek pointed out the uselessness of that. So this commit just simplifies code.

This revision was automatically updated to reflect the committed changes.