Fix bad assert in print-changed code
authorJamie Schmeiser <schmeise@ca.ibm.com>
Fri, 13 Aug 2021 14:53:24 +0000 (10:53 -0400)
committerJamie Schmeiser <schmeise@ca.ibm.com>
Fri, 13 Aug 2021 14:54:30 +0000 (10:54 -0400)
commit64f29e2dd12905b2d71e6f4b3d390c3df4cb0a80
treeea42614de31f583b97e813579c61e586f8a5dd48
parent0dc6b597db4d8b25f3df96a8f6574be732e18fdd
Fix bad assert in print-changed code

Summary:
The assertion that both functions were not missing was incorrect and would
fail when one of the functions was missing. Fixed it and moved the
assertion earlier to check the input parameters to better capture
first-failure.  Added lit test.

Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: aeubanks (Arthur Eubanks)
Differential Revision: https://reviews.llvm.org/D107989
llvm/lib/Passes/StandardInstrumentations.cpp
llvm/test/Other/ChangePrinters/print-changed-D107989.ll [new file with mode: 0644]