[PATCH] D43112: [WebAssembly] Use Symbol class heirarchy. NFC.
Nicholas Wilson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 15 00:41:50 PST 2018
ncw added a comment.
In https://reviews.llvm.org/D43112#1007692, @sbc100 wrote:
> Also, doesn't the existing assert do exactly what you want already:
>
> assert(static_cast<Symbol *>(static_cast<T *>(nullptr)) == nullptr &&
> "Not a Symbol");
>
>
> ?
D'oh! I hadn't spotted that one in amongst the rest, it covers exactly one of the cases I was worried about.
OK, I think the existing asserts cover it all then, plus your helpful comment about placement new clears that up.
Whew, thanks for adding the other assertions. I agree now it's all safe. (Although, a standards-conforming compiler could quite legally fail the assertion, no compilers will in practice and you'd just get a build failure. So that's OK.)
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D43112
More information about the llvm-commits
mailing list