From 73c77a5a92ae1faee2fc95495dc36d53ba8387ea Mon Sep 17 00:00:00 2001 From: "Ian A. Mason" Date: Mon, 10 Jul 2017 13:14:34 -0700 Subject: [PATCH] stylistic changes, plus still need to track down the SIGSEGV in the llvm-link. --- cmd/gsanity-check/sanity.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/gsanity-check/sanity.go b/cmd/gsanity-check/sanity.go index faed3e3..d55f013 100644 --- a/cmd/gsanity-check/sanity.go +++ b/cmd/gsanity-check/sanity.go @@ -93,7 +93,7 @@ func checkOS() { func checkCompilers() bool { cc := shared.GetCompilerExecName("clang") - ccOK, _, ccVersion := checkExecutable(cc, "-v") + ccOK, ccVersion, _ := checkExecutable(cc, "-v") if !ccOK { shared.LogError("The C compiler %s was not found or not executable.\nBetter not try using gclang!\n", cc) } else { @@ -101,7 +101,7 @@ func checkCompilers() bool { } cxx := shared.GetCompilerExecName("clang++") - cxxOK, _, cxxVersion := checkExecutable(cxx, "-v") + cxxOK, cxxVersion, _ := checkExecutable(cxx, "-v") if !ccOK { shared.LogError("The CXX compiler %s was not found or not executable.\nBetter not try using gclang++!\n", cxx) } else { @@ -129,7 +129,7 @@ func extractLine(version string, n int) string { } // Executes a command then returns true for success, false if there was an error, err is either nil or the error. -func checkExecutable(cmdExecName string, varg string) (success bool, err error, output string) { +func checkExecutable(cmdExecName string, varg string) (success bool, output string, err error) { cmd := exec.Command(cmdExecName, varg) var out bytes.Buffer cmd.Stdout = &out @@ -153,7 +153,7 @@ func checkAuxiliaries() bool { archiverName = "llvm-ar" } - linkerOK, _, linkerVersion := checkExecutable(linkerName, "-version") + linkerOK, linkerVersion, _ := checkExecutable(linkerName, "-version") if !linkerOK { shared.LogError("The bitcode linker %s was not found or not executable.\nBetter not try using get-bc!\n", linkerName) @@ -162,7 +162,7 @@ func checkAuxiliaries() bool { shared.LogWrite("The bitcode linker %s is:\n\n\t%s\n\n", linkerName, extractLine(linkerVersion, 1)) } - archiverOK, _, archiverVersion := checkExecutable(archiverName, "-version") + archiverOK, archiverVersion, _ := checkExecutable(archiverName, "-version") if !archiverOK { shared.LogError("The bitcode archiver %s was not found or not executable.\nBetter not try using get-bc!\n", archiverName)