diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-01-07 18:54:26 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-01-07 18:54:26 +0000 |
commit | 39cbfaadbcd0008492fc1ea967b6cc1301a938a1 (patch) | |
tree | 2e938550e01a7ac022056faab1543a7db53065a9 /tools/ccc/ccclib/Driver.py | |
parent | db439909091c5828ec229df6b31328e1fd5f67f1 (diff) |
ccc: Make proper synthetic arguments in places we have to construct
"fake" options, allowing Tools to be oblivious to whether an argument
is real or synthetic. This kills off DerivedArg & a number of FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/ccc/ccclib/Driver.py')
-rw-r--r-- | tools/ccc/ccclib/Driver.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py index 83a814eb48..85b440e23e 100644 --- a/tools/ccc/ccclib/Driver.py +++ b/tools/ccc/ccclib/Driver.py @@ -416,7 +416,8 @@ class Driver(object): if not archs: # FIXME: Need to infer arch so that we sub -Xarch # correctly. - archs.append(Arguments.DerivedArg('i386')) + archs.append(args.makeSeparateArg('i386', + self.parser.archOption)) actions = self.buildNormalPipeline(args) @@ -548,9 +549,9 @@ class Driver(object): # string. Why? if args.getJoinedValue(arg) == archName: # FIXME: This is wrong, we don't want a - # DerivedArg we want an actual parsed version - # of this arg. - filteredArgs.append(Arguments.DerivedArg(args.getSeparateValue(arg))) + # unknown arg we want an actual parsed + # version of this arg. + filteredArgs.append(args.makeUnknownArg(args.getSeparateValue(arg))) else: filteredArgs.append(arg) @@ -625,11 +626,13 @@ class Driver(object): output = finalOutput # Contruct a named destination? elif atTopLevel or hasSaveTemps: - output = Arguments.DerivedArg(namedOutput) + output = args.makeSeparateArg(namedOutput, + self.parser.oOption) else: # Output to temp file... fd,filename = tempfile.mkstemp(suffix='.'+phase.type.tempSuffix) - output = Arguments.DerivedArg(filename) + output = args.makeSeparateArg(filename, + self.parser.oOption) tool.constructJob(phase, arch, jobList, inputs, output, phase.type, forwardArgs, args) |