diff options
author | Craig Topper <craig.topper@intel.com> | 2018-02-28 20:14:34 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-02-28 20:14:34 +0000 |
commit | b95298b041c4adc5df405f9549b7aef46948915f (patch) | |
tree | 7e4af9dd20d3e5f38862381b237cc3d719b9e4ac /lldb/packages/Python/lldbsuite/test/python_api/process/main.cpp | |
parent | 7440135e621107eeca788106f9a5e610dcde30aa (diff) | |
download | bcm5719-llvm-b95298b041c4adc5df405f9549b7aef46948915f.tar.gz bcm5719-llvm-b95298b041c4adc5df405f9549b7aef46948915f.zip |
[InstCombine] Split the FP constant code out of lookThroughFPExtensions and use nullptr as a sentinel
Currently this code's control flow very much assumes that there are no meaningful checks after determining that it's a ConstantFP. So whenever it wants to stop it just does "return V". But V is also the variable name it uses when it wants to return a new value. So 'return V' appears multiple times with different meanings.
This patch just moves all the code into a helper function and returns nullptr when it wants to stop.
I've split this from D43774 while I try to figure out how to best handle the vector case there. But this change by itself at least seemed like a readability improvement.
Differential Revision: https://reviews.llvm.org/D43833
llvm-svn: 326361
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/process/main.cpp')
0 files changed, 0 insertions, 0 deletions