diff options
author | Kees Cook <kees@kernel.org> | 2025-03-12 09:50:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-12 09:50:50 -0700 |
commit | ea2e66aa8b6e363b89df66dc44275a0d7ecd70ce (patch) | |
tree | 6164c6009a050fa650451f12904d512c3dab7fcc /lldb/packages/Python/lldbsuite/test/configuration.py | |
parent | dd181af9506d515186ce510ce2f0e5dc291563f6 (diff) | |
download | llvm-ea2e66aa8b6e363b89df66dc44275a0d7ecd70ce.zip llvm-ea2e66aa8b6e363b89df66dc44275a0d7ecd70ce.tar.gz llvm-ea2e66aa8b6e363b89df66dc44275a0d7ecd70ce.tar.bz2 |
[LLVM][ConstantFold] Undefined values are not constant (#130713)
llvm.is.constant (and therefore Clang's __builtin_constant_p()) need to
report undefined values as non-constant or future DCE choices end up
making no sense. This was encountered while building the Linux kernel
which uses __builtin_constant_p() while trying to evaluate if it is safe
to use a compile-time constant resolution for string lengths or if it
must kick over to a full runtime call to strlen(). Obviously an
undefined variable cannot be known at compile-time, so
__builtin_constant_p() needs to return false. This change will also mean
that Clang will match GCC's behavior under the same conditions.
Fixes #130649
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/configuration.py')
0 files changed, 0 insertions, 0 deletions