Skip to content

Commit 1b1f444

Browse files
committed
Still finding bugs in the command line parsing. Easier to detect with wparse-args
1 parent c204c72 commit 1b1f444

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

wllvm/arglistfilter.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
4747
'-v' : (0, ArgumentListFilter.compileOnlyCallback),
4848

4949
#warnings (apart from the regex below)
50-
'-w' : (0, ArgumentListFilter.compileOnlyCallback),
51-
'-W' : (0, ArgumentListFilter.compileOnlyCallback),
50+
'-w' : (0, ArgumentListFilter.compileUnaryCallback),
51+
'-W' : (0, ArgumentListFilter.compileUnaryCallback),
5252

5353

5454
#iam: if this happens, then we need to stop and think.
@@ -317,8 +317,7 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
317317

318318
#iam: parse the cmd line, bailing if we discover that there will be no second phase.
319319
while (self._inputArgs and
320-
not (self.isAssembly or
321-
self.isAssembleOnly or
320+
not (self.isAssembleOnly or
322321
self.isPreprocessOnly)):
323322
# Get the next argument
324323
currentItem = self._inputArgs.popleft()
@@ -516,3 +515,11 @@ def dump(self):
516515
efn(f'\nsrcFile: {srcFile}\n')
517516
(objFile, bcFile) = self.getArtifactNames(srcFile)
518517
efn(f'\n{srcFile} ===> ({objFile}, {bcFile})\n')
518+
efn(f'\nFlags:\nisVerbose = {self.isVerbose}\n')
519+
efn(f'isDependencyOnly = {self.isDependencyOnly}\n')
520+
efn(f'isPreprocessOnly = {self.isPreprocessOnly}\n')
521+
efn(f'isAssembleOnly = {self.isAssembleOnly}\n')
522+
efn(f'isAssembly = {self.isAssembly}\n')
523+
efn(f'isCompileOnly = {self.isCompileOnly}\n')
524+
efn(f'isEmitLLVM = {self.isEmitLLVM}\n')
525+
efn(f'isStandardIn = {self.isStandardIn}\n')

0 commit comments

Comments
 (0)