aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-03-26 18:01:48 +0000
committerChad Rosier <mcrosier@apple.com>2013-03-26 18:01:48 +0000
commite2359e21320f39b167b31afb0c281419361faa51 (patch)
treea8bbd97d2f7cddb5b808c5fc2fac7bbb3f504610 /lib/CodeGen/BackendUtil.cpp
parent72339a0d160720c6301d629761e701e5fad56f5e (diff)
Fix a crasher by reporting a fatal error if we're unable to create the target
machine and one is required. Part of rdar://13295753 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178042 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BackendUtil.cpp')
-rw-r--r--lib/CodeGen/BackendUtil.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index 952d1fb15d..1d7395915b 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/lib/CodeGen/BackendUtil.cpp
@@ -329,7 +329,7 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
const llvm::Target *TheTarget = TargetRegistry::lookupTarget(Triple, Error);
if (!TheTarget) {
if (MustCreateTM)
- Diags.Report(diag::err_fe_unable_to_create_target) << Error;
+ llvm::report_fatal_error ("Unable to create target: " + Error);
return 0;
}