This is an archive of the discontinued LLVM Phabricator instance.

[SHAVE] Pass all -f, -g, -O, -W options through directly to moviCompile.
ClosedPublic

Authored by dougk on Jul 28 2015, 3:16 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

dougk updated this revision to Diff 30865.Jul 28 2015, 3:16 PM
dougk retitled this revision from to [SHAVE] Pass all -f, -g, -O, -W options through directly to moviCompile..
dougk updated this object.
dougk added a reviewer: jyknight.
dougk added a subscriber: cfe-commits.

Comments from the peanut gallery...

lib/Driver/Tools.cpp
9482–9488 ↗(On Diff #30865)

How worried are you about eventual incompatibilities between the flags in these groups for the driver and for the underlying SHAVE compiler? I'm moderately worried...

How many flags are we talking about here? Also, the -W flags worry me less than the rest.

Finally, why two AddAllArgs?

jyknight added inline comments.Jul 28 2015, 10:36 PM
lib/Driver/Tools.cpp
9482–9488 ↗(On Diff #30865)

How worried are you about eventual incompatibilities between the flags in these groups for the driver and for the underlying SHAVE compiler? I'm moderately worried...

Well, what bad would happen? The thing I'd expect is to have an arg that's been removed from the driver but is still supported by the underlying compiler, or, is not yet present in the underlying compiler but is supported in the driver. Neither of those seem terribly problematic -- you'll get an error from one layer or the other, which is basically the correct thing to have happen.

I think the only actual bad case is if a given flag changes between having a separate value to not, or vice versa, and that seems unlikely enough to come up that it can be ignored as a problem.

why two AddAllArgs?

Because AddAllArgs can take 3 args, and only 3 args, and that's true all the way down through "class arg_iterator", which has 3 members, "OptSpecifier Id0, Id1, Id2", rather than, say, a SmallVector<OptSpecifier, 3> Ids. Yuk.

dougk updated this revision to Diff 31029.Jul 30 2015, 8:01 AM

Make fewer calls to AddAllArgs.

jyknight accepted this revision.Jul 31 2015, 11:45 AM
jyknight edited edge metadata.

lgtm

This revision is now accepted and ready to land.Jul 31 2015, 11:45 AM
This revision was automatically updated to reflect the committed changes.