File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ argFilter = BCFilter(sys.argv[1:])
32
32
try :
33
33
[infile ] = argFilter .inputFiles
34
34
except ValueError :
35
+ logging .debug ('Input file argument not detected, assuming stdin.' )
35
36
infile = "-"
36
37
37
38
# set llvm-as
@@ -41,14 +42,20 @@ if os.getenv(llvmCompilerPathEnv):
41
42
42
43
# Now compile this llvm assembly file into a bitcode file. The output
43
44
# filename is the same as the object with a .bc appended
44
- (dirs , filename ) = os .path .split (argFilter .outFileName )
45
+ try :
46
+ (dirs , filename ) = os .path .split (argFilter .outFileName )
47
+ except AttributeError as e :
48
+ logging .error ('Output file argument not found.\n Exception message: ' + str (e ))
49
+ sys .exit (1 )
50
+
45
51
bcfilename = '.{0}.bc' .format (filename )
46
52
bcPath = os .path .join (dirs , bcfilename )
47
53
fakeAssembler = [llvmAssembler , infile , '-o' , bcPath ]
48
54
asmProc = Popen (fakeAssembler )
49
55
realRet = asmProc .wait ()
50
56
51
57
if realRet != 0 :
58
+ logging .error ('llvm-as failed' )
52
59
sys .exit (realRet )
53
60
54
61
attachBitcodePathToObject (bcPath , argFilter .outFileName )
You can’t perform that action at this time.
0 commit comments