This is an archive of the discontinued LLVM Phabricator instance.

MachineVerifier: avoid reference to nullptr
ClosedPublic

Authored by svenvh on Mar 27 2017, 3:45 AM.

Details

Summary

Instantiation of the MachineVerifierPass through
PassInfo::getNormalCtor would yield a segfault since the default
constructor of the MachineVerifierPass takes a reference to nullptr.

Patch by Simone Pellegrini

Diff Detail

Event Timeline

svenvh created this revision.Mar 27 2017, 3:45 AM
dblaikie accepted this revision.Mar 27 2017, 8:45 AM
dblaikie added a subscriber: dblaikie.

Looks good (optionally, if you like, you could switch the parameter type to std::string value (not reference) and initialize the member with std::move of the parameter)

This revision is now accepted and ready to land.Mar 27 2017, 8:45 AM
This revision was automatically updated to reflect the committed changes.