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

John McCall rjmccall at apple.com
Sun May 17 00:33:13 PDT 2009


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.

John.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gettype.patch.txt
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090517/efccfd7a/attachment.txt>


More information about the llvm-dev mailing list