Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thank you for taking care of this! Generally, LGTM, but I do wonder if it might make sense to make something like (totally untested):
template <typename InTy, typename OutTy>
static inline OutTy safe_cast_fn_ptr(InTy fn) {
return reinterpret_cast<OutTy>(reinterpret_cast<uintptr_t>(fn));
}
And use it in place of the extra type casting, since there's a fair amount of it in this test file?
~Aaron
Comment Actions
Yeah, I'd be OK with that, for sure. (probably add some checks to ensure
the source/dest types are pointers, probably, somehow, maybe)
Comment Actions
Apologies for the late reply - I've out on vacation.
This looks great. Thanks for the fix Dave!