[LLVMdev] constantexpr problem

Nick Lewycky nicholas at mxc.ca
Fri Sep 23 09:12:36 PDT 2011


On 09/23/2011 07:27 AM, tsingray liu wrote:
> Hi all,
>     I have got a problem when I used the use_empty() member function
> while I used a global variable. I erase all the instructions which will
> use a global variable. Then I called the use_empty() on that global
> variable. I got no empty because a constantexpr use the global variable.
> I wonder whether there is any way to erase the constantexpr which is
> useless to me but occupying the global variable.
>    best regard!

GV->removeDeadConstantUsers();

Nick



More information about the llvm-dev mailing list