Skip to content

Commit

Permalink
Merge pull request #4312 from jix/break-cyclic-includes
Browse files Browse the repository at this point in the history
kernel: Avoid including files outside include guards
  • Loading branch information
jix authored Apr 8, 2024
2 parents dc74608 + d8687e8 commit eb6c939
Show file tree
Hide file tree
Showing 6 changed files with 391 additions and 351 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,7 @@ $(eval $(call add_include_file,kernel/sigtools.h))
$(eval $(call add_include_file,kernel/timinginfo.h))
$(eval $(call add_include_file,kernel/utils.h))
$(eval $(call add_include_file,kernel/yosys.h))
$(eval $(call add_include_file,kernel/yosys_common.h))
$(eval $(call add_include_file,kernel/yw.h))
$(eval $(call add_include_file,libs/ezsat/ezsat.h))
$(eval $(call add_include_file,libs/ezsat/ezminisat.h))
Expand Down
6 changes: 4 additions & 2 deletions kernel/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
*
*/

#include "kernel/yosys.h"

#ifndef LOG_H
#define LOG_H

#include "kernel/yosys_common.h"

#include <time.h>

#include <regex>
Expand Down Expand Up @@ -449,4 +449,6 @@ void log_dump_args_worker(const char *p, T first, Args ... args)

YOSYS_NAMESPACE_END

#include "kernel/yosys.h"

#endif
5 changes: 3 additions & 2 deletions kernel/register.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
*
*/

#include "kernel/yosys.h"

#ifndef REGISTER_H
#define REGISTER_H

#include "kernel/yosys_common.h"
#include "kernel/yosys.h"

YOSYS_NAMESPACE_BEGIN

struct Pass
Expand Down
5 changes: 3 additions & 2 deletions kernel/rtlil.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
*
*/

#include "kernel/yosys.h"

#ifndef RTLIL_H
#define RTLIL_H

#include "kernel/yosys_common.h"
#include "kernel/yosys.h"

YOSYS_NAMESPACE_BEGIN

namespace RTLIL
Expand Down
Loading

0 comments on commit eb6c939

Please sign in to comment.