aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/runtime.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2011-04-21 22:54:23 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-04-21 22:54:23 +0000
commit26409c5246d31c7709ea85e8fea698d38bfb161d (patch)
tree333b76ad2a9f76196ed6057be0e17646cc4eddd5 /gcc/go/gofrontend/runtime.cc
parent3a6448ea919d0118ae5f4b65121e2d2042b917c7 (diff)
downloadgcc-26409c5246d31c7709ea85e8fea698d38bfb161d.zip
gcc-26409c5246d31c7709ea85e8fea698d38bfb161d.tar.gz
gcc-26409c5246d31c7709ea85e8fea698d38bfb161d.tar.bz2
Define go_assert to replace gcc_assert
This is defined in go-system.h in the backend. * go-system.h (go_assert, go_unreachable): Define. From-SVN: r172846
Diffstat (limited to 'gcc/go/gofrontend/runtime.cc')
-rw-r--r--gcc/go/gofrontend/runtime.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/go/gofrontend/runtime.cc b/gcc/go/gofrontend/runtime.cc
index b10a1b6..fe9b099 100644
--- a/gcc/go/gofrontend/runtime.cc
+++ b/gcc/go/gofrontend/runtime.cc
@@ -77,7 +77,7 @@ static Type* runtime_function_types[NUMBER_OF_RUNTIME_FUNCTION_TYPES];
static Type*
runtime_function_type(Runtime_function_type bft)
{
- gcc_assert(bft < NUMBER_OF_RUNTIME_FUNCTION_TYPES);
+ go_assert(bft < NUMBER_OF_RUNTIME_FUNCTION_TYPES);
if (runtime_function_types[bft] == NULL)
{
const source_location bloc = BUILTINS_LOCATION;
@@ -223,7 +223,7 @@ convert_to_runtime_function_type(Runtime_function_type bft, Expression* e,
return Expression::make_unsafe_cast(runtime_function_type(bft), e, loc);
case RFT_TYPE:
- gcc_assert(e->type() == Type::make_type_descriptor_ptr_type());
+ go_assert(e->type() == Type::make_type_descriptor_ptr_type());
return e;
}
}
@@ -240,7 +240,7 @@ Runtime::convert_types(Gogo* gogo)
if (t != NULL && t->named_type() != NULL)
{
bool r = t->verify();
- gcc_assert(r);
+ go_assert(r);
t->named_type()->convert(gogo);
}
}
@@ -279,7 +279,7 @@ runtime_function_declarations[Runtime::NUMBER_OF_FUNCTIONS];
Named_object*
Runtime::runtime_declaration(Function code)
{
- gcc_assert(code < Runtime::NUMBER_OF_FUNCTIONS);
+ go_assert(code < Runtime::NUMBER_OF_FUNCTIONS);
if (runtime_function_declarations[code] == NULL)
{
const Runtime_function* pb = &runtime_functions[code];
@@ -339,11 +339,11 @@ Call_expression*
Runtime::make_call(Runtime::Function code, source_location loc,
int param_count, ...)
{
- gcc_assert(code < Runtime::NUMBER_OF_FUNCTIONS);
+ go_assert(code < Runtime::NUMBER_OF_FUNCTIONS);
const Runtime_function* pb = &runtime_functions[code];
- gcc_assert(static_cast<size_t>(param_count)
+ go_assert(static_cast<size_t>(param_count)
<= sizeof(pb->parameter_types) / sizeof(pb->parameter_types[0]));
Named_object* no = runtime_declaration(code);