This is an archive of the discontinued LLVM Phabricator instance.

clang-cl: Don't treat linker input files differently when /TP or /TC is specified.
ClosedPublic

Authored by ehsan on Sep 12 2014, 10:21 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ehsan updated this revision to Diff 13641.Sep 12 2014, 10:21 AM
ehsan retitled this revision from to clang-cl: Don't treat linker input files differently when /TP or /TC is specified..
ehsan updated this object.
ehsan edited the test plan for this revision. (Show Details)
ehsan added a reviewer: rnk.
ehsan added a subscriber: Unknown Object (MLST).
hans added a subscriber: hans.Sep 12 2014, 10:53 AM
hans added inline comments.
lib/Driver/Driver.cpp
1080 ↗(On Diff #13641)

I would not base this check on what mode we're emulating, but which flag is being used as InputTypeArg, i.e. check that InputTypeArg is now OPT_x.

Also, we probably shouldn't do InputTypeArg->claim() if we don't end up using it to set the type.

hans added inline comments.Sep 12 2014, 10:57 AM
lib/Driver/Driver.cpp
1080 ↗(On Diff #13641)

Oops, s/now/not/ in my comment above.

ehsan updated this revision to Diff 13647.Sep 12 2014, 11:03 AM

Addressed the review comments.

hans accepted this revision.Sep 12 2014, 11:08 AM
hans added a reviewer: hans.

lgtm with nits addressed.

lib/Driver/Driver.cpp
1080 ↗(On Diff #13647)

Nit: I think we've usually spelled the cl.exe style options with slashes in comments.

test/Driver/cl-inputs.c
39 ↗(On Diff #13647)

This should warn that /TP is unused. I'd add a check for that.

This revision is now accepted and ready to land.Sep 12 2014, 11:08 AM
ehsan added inline comments.Sep 12 2014, 11:23 AM
test/Driver/cl-inputs.c
39 ↗(On Diff #13647)

It doesn't right now, because we get the /TC or /TP option using getLastArg which claims the argument. I'll fix that in a separate patch (checked with Hans on IRC.)

ehsan closed this revision.Sep 12 2014, 11:25 AM
ehsan updated this revision to Diff 13650.

Closed by commit rL217699 (authored by @ehsan).