This is an archive of the discontinued LLVM Phabricator instance.

[Driver][NFC] Remove some redundant code in Driver.cpp.
AcceptedPublic

Authored by Jimerlife on Mar 2 2023, 12:56 AM.

Details

Summary

options::OPT_target has been done in Driver::BuildCompilation, so I think this part of code is redundant.

Diff Detail

Event Timeline

Jimerlife created this revision.Mar 2 2023, 12:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2023, 12:56 AM
Jimerlife requested review of this revision.Mar 2 2023, 12:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2023, 12:56 AM
MaskRay accepted this revision.Mar 10 2023, 12:59 PM

computeTargetTriple has several users. You probably want to check all these code paths do not need if (const Arg *A = Args.getLastArg(options::OPT_target)).
For the uses in BuildCompilation, it seems fine.

This revision is now accepted and ready to land.Mar 10 2023, 12:59 PM