File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
include/swift/SILOptimizer/Utils Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 31
31
#include " llvm/ADT/ArrayRef.h"
32
32
33
33
namespace swift {
34
+
34
35
// / A pair representing results of devirtualization.
35
36
// / - The first element is the value representing the result of the
36
37
// / devirtualized call.
@@ -41,6 +42,10 @@ namespace swift {
41
42
// / Two elements are required, because a result of the new devirtualized
42
43
// / apply/try_apply instruction (second element) eventually needs to be
43
44
// / casted to produce a properly typed value (first element).
45
+ // /
46
+ // / *NOTE* The reason why we use a ValueBase here instead of a SILInstruction is
47
+ // / that a devirtualization result may be a BB arg if there was a cast in
48
+ // / between optional types.
44
49
typedef std::pair<ValueBase *, ApplySite> DevirtualizationResult;
45
50
46
51
DevirtualizationResult tryDevirtualizeApply (ApplySite AI,
You can’t perform that action at this time.
0 commit comments