diff options
author | Ian Lance Taylor <iant@google.com> | 2011-04-21 22:54:23 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-04-21 22:54:23 +0000 |
commit | 26409c5246d31c7709ea85e8fea698d38bfb161d (patch) | |
tree | 333b76ad2a9f76196ed6057be0e17646cc4eddd5 /gcc/go/gofrontend/lex.h | |
parent | 3a6448ea919d0118ae5f4b65121e2d2042b917c7 (diff) | |
download | gcc-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/lex.h')
-rw-r--r-- | gcc/go/gofrontend/lex.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/go/gofrontend/lex.h b/gcc/go/gofrontend/lex.h index 4202ed3..bda07f1 100644 --- a/gcc/go/gofrontend/lex.h +++ b/gcc/go/gofrontend/lex.h @@ -183,7 +183,7 @@ class Token Keyword keyword() const { - gcc_assert(this->classification_ == TOKEN_KEYWORD); + go_assert(this->classification_ == TOKEN_KEYWORD); return this->u_.keyword; } @@ -196,7 +196,7 @@ class Token const std::string& identifier() const { - gcc_assert(this->classification_ == TOKEN_IDENTIFIER); + go_assert(this->classification_ == TOKEN_IDENTIFIER); return *this->u_.identifier_value.name; } @@ -204,7 +204,7 @@ class Token bool is_identifier_exported() const { - gcc_assert(this->classification_ == TOKEN_IDENTIFIER); + go_assert(this->classification_ == TOKEN_IDENTIFIER); return this->u_.identifier_value.is_exported; } @@ -220,7 +220,7 @@ class Token std::string string_value() const { - gcc_assert(this->classification_ == TOKEN_STRING); + go_assert(this->classification_ == TOKEN_STRING); return *this->u_.string_value; } @@ -228,7 +228,7 @@ class Token const mpz_t* integer_value() const { - gcc_assert(this->classification_ == TOKEN_INTEGER); + go_assert(this->classification_ == TOKEN_INTEGER); return &this->u_.integer_value; } @@ -236,7 +236,7 @@ class Token const mpfr_t* float_value() const { - gcc_assert(this->classification_ == TOKEN_FLOAT); + go_assert(this->classification_ == TOKEN_FLOAT); return &this->u_.float_value; } @@ -244,7 +244,7 @@ class Token const mpfr_t* imaginary_value() const { - gcc_assert(this->classification_ == TOKEN_IMAGINARY); + go_assert(this->classification_ == TOKEN_IMAGINARY); return &this->u_.float_value; } @@ -252,7 +252,7 @@ class Token Operator op() const { - gcc_assert(this->classification_ == TOKEN_OPERATOR); + go_assert(this->classification_ == TOKEN_OPERATOR); return this->u_.op; } |