This is an archive of the discontinued LLVM Phabricator instance.

[bcanalyzer] Update MODULE_CODE values
Needs ReviewPublic

Authored by aenewton on Jul 25 2018, 1:38 PM.

Details

Summary

I noticed that the bcanalyzer was missing some MODULE_CODE values. It doesn't look like these codes are currently tested. Would it be advisable to create a test solely to check the proper output of these codes?

Diff Detail

Repository
rL LLVM

Event Timeline

aenewton created this revision.Jul 25 2018, 1:38 PM
george.karpenkov resigned from this revision.Jul 25 2018, 2:05 PM

Thanks Adam, the change looks good but would need a test indeed. Currently the codes are not printed if they are not known, so maybe by adding them they are now printed in one of the existing tests? It would be fine to add a new test if we can't reuse an existing one.

PS: When uploading a diff on Phabricator, please generate it with full context using -U999999. (See https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface)

Thanks for the comments, Jonas. I grepped through the tests and saw that none of them were checking against the UnknownCode string that would have been produced. It looks like I'll need to create a bitcode file that contains the codes and create a new test based on that.

Thanks for the comments, Jonas. I grepped through the tests and saw that none of them were checking against the UnknownCode string that would have been produced. It looks like I'll need to create a bitcode file that contains the codes and create a new test based on that.

We have a bunch of bitcode input files under test/Bitcode/Inputs, maybe one of those do the trick. I'd do a find for *.bc files, run it trough your updated version of llvm-bcanalyzer and grep for the new codes. If that doesn't yield anything I guess you have no other choice than adding a new bitcode file.

Hey Adam, are you still planning on upstreaming this?

My apologies, Jonas. I got caught up in some other work and likely won't be able to complete this in a timely manner.