mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 14:13:23 +00:00
Using log_assert() instead of assert()
This commit is contained in:
parent
d86a25f145
commit
7bd2d1064f
52 changed files with 236 additions and 251 deletions
|
@ -36,7 +36,6 @@
|
|||
|
||||
#include "verilog_frontend.h"
|
||||
#include "kernel/log.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
|
@ -47,7 +46,7 @@ static int my_decimal_div_by_two(std::vector<uint8_t> &digits)
|
|||
{
|
||||
int carry = 0;
|
||||
for (size_t i = 0; i < digits.size(); i++) {
|
||||
assert(digits[i] < 10);
|
||||
log_assert(digits[i] < 10);
|
||||
digits[i] += carry * 10;
|
||||
carry = digits[i] % 2;
|
||||
digits[i] /= 2;
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
static std::list<std::string> output_code;
|
||||
static std::list<std::string> input_buffer;
|
||||
|
@ -65,7 +64,7 @@ static char next_char()
|
|||
if (input_buffer.empty())
|
||||
return 0;
|
||||
|
||||
assert(input_buffer_charp <= input_buffer.front().size());
|
||||
log_assert(input_buffer_charp <= input_buffer.front().size());
|
||||
if (input_buffer_charp == input_buffer.front().size()) {
|
||||
input_buffer_charp = 0;
|
||||
input_buffer.pop_front();
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "libs/sha1/sha1.h"
|
||||
#include <sstream>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
using namespace VERILOG_FRONTEND;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue