Compute a new lattice value for the given constant. The constant, after stripping any pointer casts, should be a Function. We ignore null pointers as an optimization, since calling these values is undefined behavior.
| 246 | /// pointers as an optimization, since calling these values is undefined |
| 247 | /// behavior. |
| 248 | CVPLatticeVal computeConstant(Constant *C) { |
| 249 | if (isa<ConstantPointerNull>(C)) |
| 250 | return CVPLatticeVal(CVPLatticeVal::FunctionSet); |
| 251 | if (auto *F = dyn_cast<Function>(C->stripPointerCasts())) |
| 252 | return CVPLatticeVal({F}); |
| 253 | return getOverdefinedVal(); |
| 254 | } |
| 255 | |
| 256 | /// Handle return instructions. The function's return state is the merge of |
| 257 | /// the returned value state and the function's return state. |
nothing calls this directly
no test coverage detected