[LLVMdev] [patch] Remove getType() overrides from extractvalue and insertvalue

Eric Christopher echristo at apple.com
Mon May 18 11:47:19 PDT 2009


On May 17, 2009, at 12:33 AM, John McCall wrote:


> Several instruction classes override getType() when the instruction  
> always creates a particular type of value.  For example, the result  
> of insertelement is always a vector, so InsertElementInst overrides  
> getType() to return a VectorType*.  This makes perfect sense.   
> However, ExtractValueInst and InsertValueInst override getType() to  
> return a PointerType*, which does not make sense and is in fact  
> never correct for the latter instruction;  this is probably a relic  
> of an oversight during class creation.  So this patch simply removes  
> these overrides, which I suppose is technically an API change.

I've gone ahead and committed this - thanks John!

-eric



More information about the llvm-dev mailing list