This is an archive of the discontinued LLVM Phabricator instance.

Support Swift calling convention for WebAssembly targets
ClosedPublic

Authored by kateinoigakukun on Dec 22 2019, 5:24 PM.

Details

Summary

Support Swift calling convention for WebAssembly targets

This adds basic support for the Swift calling convention with WebAssembly targets.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2019, 5:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2019, 5:44 PM
sbc100 added inline comments.Jan 11 2020, 9:35 AM
clang/lib/Basic/Targets/WebAssembly.h
122

This seems to disagree with the longer list in callingConvSupported. Is this going to generate unnecessary warnings?

kateinoigakukun marked an inline comment as done.Jan 11 2020, 7:26 PM
kateinoigakukun added inline comments.
clang/lib/Basic/Targets/WebAssembly.h
122

By default, checkCallingConvention allows only CC_C due to it's super class implementation. This change just allow to use SwiftCC and there is no effect to other CC.

dschuff accepted this revision.Jan 22 2020, 11:04 AM

Sorry we left this dangling for so long. This little change looks fine; I guess you must be in the process of porting swift to wasm? Do you have any more detailed plans for that written down anywhere, or a prototype you can show?

This revision is now accepted and ready to land.Jan 22 2020, 11:04 AM

Sorry we left this dangling for so long. This little change looks fine; I guess you must be in the process of porting swift to wasm? Do you have any more detailed plans for that written down anywhere, or a prototype you can show?

Yes, we are working on wasm porting here. And I'm porting this forked llvm-project into upstream step by step.

Could you merge this?

This revision was automatically updated to reflect the committed changes.