This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] LTO: Fix signatures of bitcode symbols
ClosedPublic

Authored by sbc100 on Jun 27 2018, 5:39 PM.

Details

Summary

Function symbols that come from bitcode have not signatures.
After LTO when the real symbols are read in we need to make
sure that we set the signature on the existing symbol.
the signature-less undefined functions.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

sbc100 created this revision.Jun 27 2018, 5:39 PM
sbc100 updated this revision to Diff 153227.Jun 27 2018, 5:52 PM
  • fix test
sbc100 updated this revision to Diff 153239.Jun 27 2018, 6:37 PM
  • cleanup
ruiu accepted this revision.Jun 27 2018, 10:54 PM

LGTM

wasm/Driver.cpp
260–262

Do you need this assert? I think if it is a nullptr, it will crash immediately on the next line, so that assert() doesn't seem that useful.

wasm/Symbols.h
129

nit: insert a blank line before "protected:".

This revision is now accepted and ready to land.Jun 27 2018, 10:54 PM
dexonsmith added inline comments.Jun 28 2018, 8:47 AM
wasm/Driver.cpp
260–262

I don't think it will crash here without some sort of sanitizer. Saving a reference in Sig doesn't load from the pointer.

This revision was automatically updated to reflect the committed changes.