[cfe-commits] r61794 - /cfe/trunk/tools/ccc/ccclib/Arguments.py
Daniel Dunbar
daniel at zuster.org
Mon Jan 5 22:32:49 PST 2009
Author: ddunbar
Date: Tue Jan 6 00:32:49 2009
New Revision: 61794
URL: http://llvm.org/viewvc/llvm-project?rev=61794&view=rev
Log:
ccc: Remove ValueArg::setValue, this is no longer used.
Modified:
cfe/trunk/tools/ccc/ccclib/Arguments.py
Modified: cfe/trunk/tools/ccc/ccclib/Arguments.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/ccclib/Arguments.py?rev=61794&r1=61793&r2=61794&view=diff
==============================================================================
--- cfe/trunk/tools/ccc/ccclib/Arguments.py (original)
+++ cfe/trunk/tools/ccc/ccclib/Arguments.py Tue Jan 6 00:32:49 2009
@@ -131,17 +131,11 @@
def getValue(self, args):
abstract
- def setValue(self, args, value):
- abstract
-
class PositionalArg(ValueArg):
"""PositionalArg - A simple positional argument."""
def getValue(self, args):
return args[self.index]
-
- def setValue(self, args, value):
- args[self.index] = value
def render(self, args):
return [args[self.index]]
@@ -153,10 +147,6 @@
def getValue(self, args):
return args[self.index][len(self.opt.name):]
- def setValue(self, args, value):
- assert self.opt.name == args[self.index][:len(self.opt.name)]
- args[self.index] = self.opt.name + value
-
def render(self, args):
return [self.opt.name + self.getValue(args)]
@@ -167,9 +157,6 @@
def getValue(self, args):
return args[self.index+1]
- def setValue(self, args, value):
- args[self.index+1] = value
-
def render(self, args):
return [self.opt.name, self.getValue(args)]
@@ -182,10 +169,6 @@
def getValues(self, args):
return args[self.index + 1:self.index + 1 + self.opt.numArgs]
- def setValues(self, args, value):
- assert self.opt.numArgs == len(value)
- args[self.index + 1:self.index + 1 + self.opt.numArgs] = value
-
def render(self, args):
return [self.opt.name] + self.getValues(args)
@@ -226,9 +209,6 @@
def getValue(self, args):
return self.value
- def setValue(self, args, value):
- raise ValueError,"Cannot call setValue() on a DerivedArg."
-
def render(self, args):
return [self.value]
@@ -266,6 +246,8 @@
def getJoinedValue(self, arg):
return arg.getJoinedValue(self.argv)
+
+###
class OptionParser:
def __init__(self):
More information about the cfe-commits
mailing list