[patch] Don't rauw an alias in llvm.used (v2)
Rafael EspĂndola
rafael.espindola at gmail.com
Tue May 7 21:27:11 PDT 2013
> Doxy-strings please! :)
Done.
> +static int compareNames(const void *A, const void *B) {
> + const GlobalValue *VA = *reinterpret_cast<GlobalValue* const*>(A);
> + const GlobalValue *VB = *reinterpret_cast<GlobalValue* const*>(B);
> + if (VA->getName() < VB->getName())
> + return -1;
> + if (VB->getName() < VA->getName())
> + return 1;
> + return 0;
> +}
>
> Say, what *does* happen if you have unnamed global values?
I tried using SetVector, but it has no erase method. But then again, I
was not even able to write a case where we get an unnamed value in
llvm.used. The attached patch adds this check to the verifier.
Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 11070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130508/fc7cad2d/attachment.obj>
More information about the llvm-commits
mailing list