[LLVMdev] "SrcValue is not a pointer?" assertion in SelectionDAG::getSrcValue

ether zhhb etherzhhb at gmail.com
Thu Dec 3 22:54:40 PST 2009


hi sam,

i cant quite understand the follow code in SelectionDAG::getSrcValue
are not necessary:

assert((!V || isa<PointerType>(V->getType())) &&
         "SrcValue is not a pointer?");

why V must be a pointer?

thanks

--ether


On Fri, Dec 4, 2009 at 10:25 AM, Samuel Crow <samuraileumas at yahoo.com> wrote:
> Hello Ether,
>
> I think it is referring to the Value class (captial V) whose documentation is found at http://llvm.org/doxygen/classllvm_1_1Value.html .  It has to be a pointer because the Value class is a parent class to many many child classes.
>
> --Sam
>
>
>
> ----- Original Message ----
>> From: ether zhhb <etherzhhb at gmail.com>
>> To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
>> Sent: Thu, December 3, 2009 7:45:42 PM
>> Subject: [LLVMdev] "SrcValue is not a pointer?" assertion in SelectionDAG::getSrcValue
>>
>> hi,
>>
>> i am building selectionDAG by my own code, but got a assertion fail
>> said "SrcValue is not a pointer?".
>>
>> but since the comment above the SrcValueSDNode said: "SrcValueSDNode -
>> An SDNode that holds an arbitrary LLVM IR Value." why the llvm value
>> of SrcValueSDNode must be with PointerType? is that assertion
>> necessary? thanks a lots.
>>
>> regards
>> --ether
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
>
>




More information about the llvm-dev mailing list