aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-03-03 19:16:11 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-03-04 18:24:47 +0100
commit0e890cd4d42644eb42bc30b24101c7659ec324aa (patch)
treec41b7172f7213712da73fc0f25293e18ca21a117 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parentd4f9675b5509e26573058318682a9ed5d7aaf320 (diff)
downloadllvm-0e890cd4d42644eb42bc30b24101c7659ec324aa.zip
llvm-0e890cd4d42644eb42bc30b24101c7659ec324aa.tar.gz
llvm-0e890cd4d42644eb42bc30b24101c7659ec324aa.tar.bz2
[ConstantFolding] Always return something from ConstantFoldConstant
Spin-off from D75407. As described there, ConstantFoldConstant() currently returns null for non-ConstantExpr/ConstantVector inputs, but otherwise always returns non-null, independently of whether any folding has happened or not. This is confusing and makes consumer code more complicated. I would expect either that ConstantFoldConstant() returns only if it actually folded something, or that it always returns non-null. I'm going to the latter possibility here, which appears to be more useful considering existing usage. Differential Revision: https://reviews.llvm.org/D75543
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions