This is an archive of the discontinued LLVM Phabricator instance.

[lld][WebAssembly] Give better error message on bad archive member
ClosedPublic

Authored by sbc100 on Jun 30 2020, 8:40 AM.

Details

Summary

Include the archive name as well as the member name when an error
is encountered parsing bitcode archives.

Diff Detail

Event Timeline

sbc100 created this revision.Jun 30 2020, 8:40 AM
dschuff added inline comments.Jun 30 2020, 11:28 AM
lld/test/wasm/lto/incompatible.ll
12

so this has to be a wildcard {{.*}}.a and can't be something like %t.a? I guess because there's no way to get the basename?

Also: should there be a space between the .a and the (?

sbc100 marked an inline comment as done.Jun 30 2020, 12:26 PM
sbc100 added inline comments.
lld/test/wasm/lto/incompatible.ll
12

I'll try just %t.a.

No space between archive name and open paren, no.

sbc100 marked an inline comment as done.Jun 30 2020, 1:11 PM
sbc100 added inline comments.
lld/test/wasm/lto/incompatible.ll
12

Actually you can't use %t in check pattern.. would need to pass extra args to FileCheck. I'm inclined to leave this as is.. since it fits with the existing tests and covers what we really care about here.

dschuff accepted this revision.Jun 30 2020, 2:05 PM
This revision is now accepted and ready to land.Jun 30 2020, 2:05 PM
This revision was automatically updated to reflect the committed changes.