ccc: Remove ValueArg::setValue, this is no longer used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61794 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2009-01-06 06:32:49 +00:00
Родитель ba6e323fd6
Коммит 1dd2adabee
1 изменённых файлов: 2 добавлений и 20 удалений

Просмотреть файл

@ -131,17 +131,11 @@ class ValueArg(Arg):
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 @@ class JoinedValueArg(ValueArg):
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 @@ class SeparateValueArg(ValueArg):
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 @@ class MultipleValuesArg(Arg):
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 @@ class DerivedArg(ValueArg):
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 @@ class ArgList:
def getJoinedValue(self, arg):
return arg.getJoinedValue(self.argv)
###
class OptionParser:
def __init__(self):