aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestJava.cpp
diff options
context:
space:
mode:
authorJessica Paquette <jpaquette@apple.com>2021-04-02 13:16:13 -0700
committerJessica Paquette <jpaquette@apple.com>2022-01-14 11:15:14 -0800
commitacb8de565eaa2638d18362085085deb4628435b4 (patch)
treef164d33a75467783b5e20a5d871e8bde45a5d086 /clang/unittests/Format/FormatTestJava.cpp
parent3d5b9fb3e3cd60d3bb755e43c1abdea42d2e7580 (diff)
downloadllvm-acb8de565eaa2638d18362085085deb4628435b4.zip
llvm-acb8de565eaa2638d18362085085deb4628435b4.tar.gz
llvm-acb8de565eaa2638d18362085085deb4628435b4.tar.bz2
[JumpThreading] Change asserts for WantInteger into actual checks
After e734e8286b4b521d829aaddb6d1cbbd264953625, it is possible to end up in a situation where an `indirectbr` is fed by a cast, which is in turn fed by an operation which only produces integers. `indirectbr` expects a block address, however these operations can't produce that. There were several asserts in `computeValueKnownInPredecessorsImpl` which check that we're not looking for a block address if we're walking through something which can never produce one. Since it's now possible to hit these asserts, this changes them into actual checks which return false if `Preference` is not `WantInteger`. This adds a testcase which verifies that we don't crash anymore in these situations. Differential Revision: https://reviews.llvm.org/D99814
Diffstat (limited to 'clang/unittests/Format/FormatTestJava.cpp')
0 files changed, 0 insertions, 0 deletions