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

David Zarzycki via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 5 06:05:25 PST 2021


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?
Dave


More information about the llvm-dev mailing list