github.com/guyezi/gofrontend@v0.0.0-20200228202240-7a62a49e62c0/libgo/runtime/go-assert.h (about) 1 /* go-assert.h -- libgo specific assertions 2 3 Copyright 2010 The Go Authors. All rights reserved. 4 Use of this source code is governed by a BSD-style 5 license that can be found in the LICENSE file. */ 6 7 #ifndef LIBGO_GO_ASSERT_H 8 #define LIBGO_GO_ASSERT_H 9 10 /* We use a Go specific assert function so that functions which call 11 assert aren't required to always split the stack. */ 12 13 extern void __go_assert_fail (const char *file, unsigned int lineno) 14 __attribute__ ((noreturn)); 15 16 #define __go_assert(e) ((e) ? (void) 0 : __go_assert_fail (__FILE__, __LINE__)) 17 18 #endif /* !defined(LIBGO_GO_ASSERT_H) */