From 649b860d2bbeb758d7bb6c49754df8a6c8cb8650 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Mon, 1 Dec 2008 15:21:33 +0100 Subject: [PATCH] Added error when gcc cannot be found. --- gen/toobj.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gen/toobj.cpp b/gen/toobj.cpp index cfe8f044..be95fc15 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -409,6 +409,11 @@ void assemble(const llvm::sys::Path& asmpath, const llvm::sys::Path& objpath, ch using namespace llvm; sys::Path gcc = llvm::sys::Program::FindProgramByName("gcc"); + if (gcc.empty()) + { + error("failed to locate gcc"); + fatal(); + } // Remove these environment variables from the environment of the // programs that we will execute. It appears that GCC sets these