Skip to content

Commit ff93822

Browse files
Merge pull request #70878 from kateinoigakukun/pr-02f4c271b06b6ca3f0607bf3b7d5051130b61b08
[Runtime] Fix `AbsoluteFuncPtr` to allow template parameter inference
2 parents fcbe559 + 5a40933 commit ff93822

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/swift/ABI/CompactFunctionPointer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace swift {
2626
/// integer.
2727
/// As a trade-off compared to relative pointers, this has load-time overhead in PIC
2828
/// and is only available on 32-bit targets.
29-
template <typename T>
29+
template <typename T, bool Nullable = false, typename Offset = int32_t>
3030
class AbsoluteFunctionPointer {
3131
T *Pointer;
3232
static_assert(sizeof(T *) == sizeof(int32_t),

include/swift/ABI/TargetLayout.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct InProcess {
104104

105105
template <typename T, bool Nullable = true, typename Offset = int32_t>
106106
#if SWIFT_COMPACT_ABSOLUTE_FUNCTION_POINTER
107-
using CompactFunctionPointer = AbsoluteFunctionPointer<T>;
107+
using CompactFunctionPointer = AbsoluteFunctionPointer<T, Nullable, Offset>;
108108
#else
109109
using CompactFunctionPointer =
110110
swift::RelativeDirectPointer<T, Nullable, Offset>;

0 commit comments

Comments
 (0)