ExecutionEngine: Check for NULL ErrorStr before using it.

Patch by Yury Mikhaylov <yury.mikhaylov@gmail.com>.

llvm-svn: 156523
This commit is contained in:
Jim Grosbach 2012-05-10 00:31:50 +00:00
parent 6dd62fd99d
commit 1ace8b6a76
1 changed files with 3 additions and 2 deletions

View File

@ -56,8 +56,9 @@ TargetMachine *EngineBuilder::selectTarget(const Triple &TargetTriple,
} }
if (!TheTarget) { if (!TheTarget) {
*ErrorStr = "No available targets are compatible with this -march, " if (ErrorStr)
"see -version for the available targets.\n"; *ErrorStr = "No available targets are compatible with this -march, "
"see -version for the available targets.\n";
return 0; return 0;
} }