IR: Thread OnlyIfReduced through ConstantExpr::getWithOperands()
In order to change `ConstantExpr::replaceUsesOfWithOnConstant()` to work like other constants (e.g., using `ConstantArray::getImpl()`), thread `OnlyIfReduced` through as necessary. When `OnlyIfReduced` is false, there's no functionality change. When it's true, if there's no constant folding or type changes `nullptr` is returned instead of the new constant. `ConstantExpr::replaceUsesOfWithOnConstant()` will be updated to use the "true" version in a follow-up commit. llvm-svn: 216015
Loading
Please register or sign in to comment