This is an archive of the discontinued LLVM Phabricator instance.

BitcodeReader: Avoid bad debug info warnings when stripping
Needs ReviewPublic

Authored by tpr on May 4 2022, 5:37 AM.

Details

Reviewers
aprantl
chandlerc
Summary

When loading old bitcode where the debug info would need upgrading, but
I am asking to strip debug info, it would give warnings about bad debug
info anyway. This commit stops it doing that.

Diff Detail

Event Timeline

tpr created this revision.May 4 2022, 5:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2022, 5:37 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
tpr requested review of this revision.May 4 2022, 5:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2022, 5:37 AM

I think agree with the idea of the patch. Can you please check that (1) there is an existing test that ensures warning is printed when not explicitly stripping debug info and (2) add a test for this case?

The debug info "upgrade" mechanism is unintuitive that I'm worried that this could subtly break intended behavior if it isn't tested.