[llvm-dev] [RFC] Create llvm/Support/InternalLimits.h

Aaron Ballman via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 5 06:23:08 PST 2021


On Fri, Mar 5, 2021 at 9:05 AM David Zarzycki via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
> Hello,
>
> There are internal limits within LLVM that are fundamental to how LLVM operates but are defined in awkward places when it comes to library layering. I'd like to propose that we fix that with a simple "InternalLimits.h" file that contains a few essential constants.
>
> For example, the maximum alignment supported by LLVM is defined by CodeGen but clang's Sema needs to know that value to enforce that users stay within bounds. That being said, clang's Sema doesn't need or want to depend on CodeGen for various good reasons.
>
> If we create llvm/Support/InternalLimits.h and define the alignment limit there, then LLVM's CodeGen and clang's Sema can both include that file without Sema creating a dependency on CodeGen.
>
> Thoughts?

Thank you for looking into this! I think that sounds like a reasonable approach.

~Aaron

> Dave
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list