This is an archive of the discontinued LLVM Phabricator instance.

Fix validation of the -mthread-model flag in the Clang driver
ClosedPublic

Authored by itessier on Sep 5 2017, 4:32 PM.

Details

Reviewers
jroelofs
compnerd
Summary

The ToolChain class validates the -mthread-model flag in the constructor which doesn't work correctly since the thread model methods are virtual methods. The check is moved into Clang::ConstructJob() when constructing the internal command line.

Diff Detail

Event Timeline

itessier created this revision.Sep 5 2017, 4:32 PM

The change looks good. Can you please add some test cases for this? Or do existing test cases cover this already?

The change looks good. Can you please add some test cases for this? Or do existing test cases cover this already?

Should have added this to the description, but yes there are existing tests that cover this flag (test/Driver/thread-model.c). D37493 removes the only overridden thread model methods so we can't test the fix in this CL.

compnerd accepted this revision.Sep 6 2017, 8:19 PM
This revision is now accepted and ready to land.Sep 6 2017, 8:19 PM

Do you mind submitting this CL? I don't have access to SVN.

jroelofs closed this revision.Sep 7 2017, 3:02 PM
jroelofs edited edge metadata.

r312748