TritModel.cc uses abc kissat. Include the necessary header.#10610
TritModel.cc uses abc kissat. Include the necessary header.#10610hzeller wants to merge 1 commit into
Conversation
Signed-off-by: Henner Zeller <h.zeller@acm.org>
| extern void kissat_set_terminate(kissat* solver, | ||
| void* state, | ||
| int (*terminate)(void* state)); | ||
| } // namespace abc |
There was a problem hiding this comment.
Strictly speaking it's not necessary as we declare what we use here, and it's unlikely kissat's interface will ever change. By going the include way we'll pick up abc's global header (abc_global.h) with certain pragmas and macro definitions which might cause conflict, though we are exposed to abc's header in other parts of openroad anyway.
@hzeller what's motivating the include?
There was a problem hiding this comment.
Include what you use, essentially (also commonly known as IWYU).
It is dangerous to assume (and forward declare) a particular prototype (as it can change any time, and then you get weird issues), the best is to actually include the header, so we always include the corresponding headers to symbols. If there are issues with pragmas and macros, then we undef them or fix things upstream.
I stumbled upon it, as I ran the bant build cleaner and it suggested to remove @abc, as there is no header from abc included in any of the sources of //src/syn/src/ir, thus concluded that the abc dependency must be accidental and can be removed.
$ bant dwyu //src/syn/src/ir
buildozer 'remove deps @abc' //src/syn/src/irThere was a problem hiding this comment.
I agree in general but here I think it's more likely we will run into some kind of issue with the abc headers than the kissat interface changing.
There was a problem hiding this comment.
What issue do you expect ? Things seem to compile nicely.
povik
left a comment
There was a problem hiding this comment.
to resolve bant false positive
|
Note, it is not a false positive, it is an actual positive: no abc header is included anywhere, so no dependency is added. (you can tell |
No description provided.