[clang] [Hexagon] Fix B0 macro conflict between hexagon_types.h and termios.h (PR #184539)

Brian Cain via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 5 08:18:48 PST 2026


androm3da wrote:

> > > I'm fine with this change. Not sure if there's a better fix available for this. This change will guard the function definition but the call sites for B0 will not work. Should consider renaming the function too?
> > 
> > 
> > Yeah - this solution is not as effective as I thought. Renaming should work, I'll do that instead.
> 
> Hmm - but renaming breaks existing callers, right? Not sure how to fix this without introducing breakage.

We could - in addition to the push/pop - create aliases that don't conflict (e.g. lowercase like `b0`).  That way, folks can include both headers and nothing breaks ... until they try `B0()`, at which point they can use`b0()` instead.

And at some point in the future we could theoretically deprecate the upper case versions.  Or not.

https://github.com/llvm/llvm-project/pull/184539


More information about the cfe-commits mailing list