This is an archive of the discontinued LLVM Phabricator instance.

[Flang][Driver][NFC] Improve -emit-obj unit tests
ClosedPublic

Authored by skatrak on May 1 2023, 4:10 AM.

Details

Summary

Instead of looking for the existence of a ret instruction after disassembly
as a way to check that the right ISA is present in the produced binary, check
instead the ELF header of the file. This is a more reliable solution, since the
alternative can easily result in false positives.

Diff Detail

Event Timeline

skatrak created this revision.May 1 2023, 4:10 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
skatrak requested review of this revision.May 1 2023, 4:10 AM
awarzynski accepted this revision.May 2 2023, 11:26 AM

Thanks a ton for implementing this! LGTM

This revision is now accepted and ready to land.May 2 2023, 11:26 AM
This revision was automatically updated to reflect the committed changes.

Thanks a ton for implementing this! LGTM

No problem! ;)