<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, Aug 12, 2017 at 1:15 PM Mandeep Singh Grang via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">mgrang added a comment.<br>
<br>
> Probably a layering violation to include this here. Also seems like a narrow solution - would require more special casing here for other types that are like these two whenever they might get used in a map eventually, etc.<br>
<br>
Yes, this is true. But I cannot think of a way of overcoming this.<br></blockquote><div><br>I've attached a diff on top of your change that /seems/ to work without the special cases for LLVMOpaque* - should allow all pointer types, even those to incomplete types, to work - plus any types that are PointerLike.<br><br>Test case probably needs a test for some PointerLike type, maybe? Not sure.<br><br>Anyway - if you reckon my change to the trait stuff looks like (& maybe see about more testing if you think there's something that could/should be covered) - this is probably good enough to be committed, I think.<br><br>- Dave<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> Any chance of implementing is_pointer_like as "is a pointer, or (SFINAE'd) is pointer like"?<br>
<br>
I have already implemented IsPointerLike as a SFINAE.<br>
<br>
> (I'd probably name the trait "IsPointerLike" to match the kind of naming of PointerLikeTypeTraits - though I realize this might be a bit confusing if it's true for things that don't have PointerLikeTypeTraits, like these two special cases you mentioned (LLVMOpaqueBasicBlock & LLVMOpaqueValue) )<br>
<br>
Done.<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D35043" rel="noreferrer" target="_blank">https://reviews.llvm.org/D35043</a><br>
<br>
<br>
<br>
</blockquote></div></div>