/// Return the SymbolicValue for the specified SIL value, lazily computing /// it if needed. SymbolicValue ConstExprFunctionState::getConstantValue(SILValue value) { // Check to see if we already have an answer. auto it = calculatedValues.find(value); if (it != calculatedValues.end()) return it->second; // Compute the value of a normal instruction based on its operands. auto result = computeConstantValue(value); // If this is the top-level lazy interpreter, output a debug trace. if (!fn) { LLVM_DEBUG(llvm::dbgs() << "ConstExpr top level: "; value->dump()); LLVM_DEBUG(llvm::dbgs() << " RESULT: "; result.dump()); }