On my system I have gv 3.5.8 and it does not like to be called with --spartan before the <filename>.
The man-page is stating that the file name has to come before all arguments and the --spartan is actually -spartan. I don't know for newer versions of gv.
The attached patch fixes that for me.
Please apply if appropriate.
llvm-viewgraph-gv-call.diff (475 Bytes)