Skip to content

Commit 1e2ff54

Browse files
authored
Merge pull request #11838 from gottesmm/pr-ca32e200fc7885a008468272cf6a7609d02fe2aa
2 parents 5c99929 + 9f53380 commit 1e2ff54

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/swift/SILOptimizer/Utils/Devirtualize.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "llvm/ADT/ArrayRef.h"
3232

3333
namespace swift {
34+
3435
/// A pair representing results of devirtualization.
3536
/// - The first element is the value representing the result of the
3637
/// devirtualized call.
@@ -41,6 +42,10 @@ namespace swift {
4142
/// Two elements are required, because a result of the new devirtualized
4243
/// apply/try_apply instruction (second element) eventually needs to be
4344
/// 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.
4449
typedef std::pair<ValueBase *, ApplySite> DevirtualizationResult;
4550

4651
DevirtualizationResult tryDevirtualizeApply(ApplySite AI,

0 commit comments

Comments
 (0)