diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2014-11-27 00:12:26 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2014-11-27 00:12:26 +0000 |
| commit | 594c10de22daf423311b4a4c72d74740b9a21ad1 (patch) | |
| tree | 14656f1ea94f70b757612551292e3cf919c38936 /llgo/third_party/gofrontend/libgo/runtime/go-assert.c | |
| parent | ad9841e8ac74bfcb1814b728a143408e87dd00a7 (diff) | |
| download | bcm5719-llvm-594c10de22daf423311b4a4c72d74740b9a21ad1.tar.gz bcm5719-llvm-594c10de22daf423311b4a4c72d74740b9a21ad1.zip | |
Initial commit of llgo third_party.
llvm-svn: 222858
Diffstat (limited to 'llgo/third_party/gofrontend/libgo/runtime/go-assert.c')
| -rw-r--r-- | llgo/third_party/gofrontend/libgo/runtime/go-assert.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llgo/third_party/gofrontend/libgo/runtime/go-assert.c b/llgo/third_party/gofrontend/libgo/runtime/go-assert.c new file mode 100644 index 00000000000..a36f43a75e4 --- /dev/null +++ b/llgo/third_party/gofrontend/libgo/runtime/go-assert.c @@ -0,0 +1,19 @@ +/* go-assert.c -- libgo specific assertions + + Copyright 2010 The Go Authors. All rights reserved. + Use of this source code is governed by a BSD-style + license that can be found in the LICENSE file. */ + +#include <stdio.h> +#include <stdlib.h> + +#include "runtime.h" +#include "go-assert.h" + +void +__go_assert_fail (const char *file, unsigned int lineno) +{ + /* FIXME: Eventually we should dump a stack trace here. */ + runtime_printf ("%s:%U: libgo assertion failure\n", file, (uint64) lineno); + abort (); +} |

