[llvm-commits] [llvm] r156523 - /llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp
Jim Grosbach
grosbach at apple.com
Wed May 9 17:31:50 PDT 2012
Author: grosbach
Date: Wed May 9 19:31:50 2012
New Revision: 156523
URL: http://llvm.org/viewvc/llvm-project?rev=156523&view=rev
Log:
ExecutionEngine: Check for NULL ErrorStr before using it.
Patch by Yury Mikhaylov <yury.mikhaylov at gmail.com>.
Modified:
llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp
Modified: llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp?rev=156523&r1=156522&r2=156523&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/TargetSelect.cpp Wed May 9 19:31:50 2012
@@ -56,8 +56,9 @@
}
if (!TheTarget) {
- *ErrorStr = "No available targets are compatible with this -march, "
- "see -version for the available targets.\n";
+ if (ErrorStr)
+ *ErrorStr = "No available targets are compatible with this -march, "
+ "see -version for the available targets.\n";
return 0;
}
More information about the llvm-commits
mailing list