Skip to content

Commit 00d64a4

Browse files
committed
whitespace
1 parent 4d9d1e0 commit 00d64a4

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

driver/utils.py

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
# Internal logger
3838
_logger = logging.getLogger(__name__)
3939

40-
# Flag for debugging
40+
# Flag for debugging
4141
DEBUG = False
4242

4343

@@ -66,7 +66,7 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
6666
'-c' : (0, ArgumentListFilter.compileOnlyCallback),
6767
'-E' : (0, ArgumentListFilter.preprocessOnlyCallback),
6868
'-S' : (0, ArgumentListFilter.assembleOnlyCallback),
69-
69+
7070
'--verbose' : (0, ArgumentListFilter.verboseFlagCallback),
7171
'--param' : (1, ArgumentListFilter.defaultBinaryCallback),
7272
'-aux-info' : (1, ArgumentListFilter.defaultBinaryCallback),
@@ -77,8 +77,8 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
7777
#warnings (apart from the regex below)
7878
'-w' : (0, ArgumentListFilter.compileOnlyCallback),
7979
'-W' : (0, ArgumentListFilter.compileOnlyCallback),
80-
81-
80+
81+
8282
#iam: if this happens, then we need to stop and think.
8383
'-emit-llvm' : (0, ArgumentListFilter.abortUnaryCallback),
8484

@@ -92,7 +92,7 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
9292
'-integrated-as' : (0, ArgumentListFilter.compileUnaryCallback),
9393
#iam: gcc uses this in both compile and link, but clang only in compile
9494
'-pthread' : (0, ArgumentListFilter.compileUnaryCallback),
95-
95+
9696
#iam: arm stuff
9797
'-mno-omit-leaf-frame-pointer' : (0, ArgumentListFilter.compileUnaryCallback),
9898
'-maes' : (0, ArgumentListFilter.compileUnaryCallback),
@@ -151,8 +151,8 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
151151
'-g0' : (0, ArgumentListFilter.compileUnaryCallback), #iam: clang not gcc
152152
'-gdwarf-2' : (0, ArgumentListFilter.compileUnaryCallback),
153153
'-gdwarf-3' : (0, ArgumentListFilter.compileUnaryCallback),
154-
'-p' : (0, ArgumentListFilter.compileUnaryCallback),
155-
'-pg' : (0, ArgumentListFilter.compileUnaryCallback),
154+
'-p' : (0, ArgumentListFilter.compileUnaryCallback),
155+
'-pg' : (0, ArgumentListFilter.compileUnaryCallback),
156156

157157
# Optimization
158158
'-O' : (0, ArgumentListFilter.compileUnaryCallback),
@@ -275,7 +275,7 @@ def _shiftArgs(self, nargs):
275275
def abortUnaryCallback(self, flag):
276276
_logger.warning('Out of context experience: "{0}"'.format(str(self.inputList)))
277277
sys.exit(1)
278-
278+
279279
def inputFileCallback(self, infile):
280280
_logger.debug('Input file: ' + infile)
281281
self.inputFiles.append(infile)
@@ -284,9 +284,9 @@ def inputFileCallback(self, infile):
284284

285285
def outputFileCallback(self, flag, filename):
286286
self.outputFilename = filename
287-
287+
288288
def objectFileCallback(self, objfile):
289-
self.objectFiles.append(objfile)
289+
self.objectFiles.append(objfile)
290290

291291
def preprocessOnlyCallback(self, flag):
292292
self.isPreprocessOnly = True
@@ -591,7 +591,7 @@ def buildAndAttachBitcode(builder):
591591

592592
#iam: when we have multiple input files we'll have to keep track of their object files.
593593
newObjectFiles = []
594-
594+
595595
hidden = not af.isCompileOnly
596596

597597
if len(af.inputFiles) == 1 and af.isCompileOnly:
@@ -610,36 +610,36 @@ def buildAndAttachBitcode(builder):
610610
attachBitcodePathToObject(bcFile, objFile)
611611

612612
else:
613-
613+
614614
for srcFile in af.inputFiles:
615615
(objFile, bcFile) = af.getArtifactNames(srcFile, hidden)
616616
if hidden:
617617
buildObjectFile(builder, srcFile, objFile)
618618
newObjectFiles.append(objFile)
619619
buildBitcodeFile(builder, srcFile, bcFile)
620620
attachBitcodePathToObject(bcFile, objFile)
621-
621+
622622

623623
if not af.isCompileOnly:
624624
linkFiles(builder, newObjectFiles)
625-
625+
626626
sys.exit(0)
627627

628628
def linkFiles(builder, objectFiles):
629629
af = builder.getBitcodeArglistFilter()
630630
outputFile = af.getOutputFilename()
631631
cc = builder.getCompiler()
632-
cc.extend(af.objectFiles)
633-
cc.extend(objectFiles)
634-
cc.extend(af.linkArgs)
632+
cc.extend(af.objectFiles)
633+
cc.extend(objectFiles)
634+
cc.extend(af.linkArgs)
635635
cc.extend(['-o', outputFile])
636636
proc = Popen(cc)
637637
rc = proc.wait()
638638
if rc != 0:
639639
_logger.warning('Failed to link "{0}"'.format(str(cc)))
640640
sys.exit(rc)
641641

642-
642+
643643
def buildBitcodeFile(builder, srcFile, bcFile):
644644
af = builder.getBitcodeArglistFilter()
645645
bcc = builder.getBitcodeCompiler()
@@ -663,7 +663,7 @@ def buildObjectFile(builder, srcFile, objFile):
663663
if rc != 0:
664664
_logger.warning('Failed to generate object "{0}" for "{1}"'.format(objFile, srcFile))
665665
sys.exit(rc)
666-
666+
667667
# bd & iam:
668668
#
669669
# case 1 (compileOnly):
@@ -674,14 +674,14 @@ def buildObjectFile(builder, srcFile, objFile):
674674
# locating them is easy:
675675
# either the .o is in the cmdline and we are in the simple case,
676676
# or else it was generated according to getObjectFilename
677-
#
677+
#
678678
# we then produce and attach bitcode for each inputFile in the cmdline
679679
#
680680
#
681681
# case 2 (compile and link)
682682
#
683683
# af.inputFiles is not empty, and compileOnly is false.
684-
# in this case the .o's may not exist, we must regenerate
684+
# in this case the .o's may not exist, we must regenerate
685685
# them in any case.
686686
#
687687
#
@@ -690,4 +690,3 @@ def buildObjectFile(builder, srcFile, objFile):
690690
# in this case af.inputFiles is empty and we are done
691691
#
692692
#
693-

0 commit comments

Comments
 (0)