I notice that there's a lot of inconsistency in the various LLVM classes with respect to convenience methods. Here's some examples:<div><br></div><div>For creating GEPS, IRBuilder has:<br><div><br></div><div>  CreateGEP (2 overloads)</div>

<div>  CreateInBoundsGEP (2 overloads)</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div>  CreateConstGEP1_32</div><div>  CreateConstInBoundsGEP1_32</div><div>  CreateConstGEP2_32</div><div>

  CreateConstInBoundsGEP2_32</div><div>  CreateConstGEP1_64</div><div>  CreateConstInBoundsGEP1_64</div><div>  CreateConstGEP2_64</div><div>  CreateConstInBoundsGEP2_64</div><div>  CreateStructGEP</div><div><br></div><div>

All of which are very useful. However, ConstExpression only has:</div><div><br></div><div><div>  getGetElementPtr</div><div>  getGetElementPtr</div><div>  getInBoundsGetElementPtr</div><div>  getInBoundsGetElementPtr</div>

</div><div><br></div><div>It would be nice if ConstantExpr's GEP-building methods used the same naming convention and had the same convenience methods as IRBuilder. (In fact, the naming convention between IRBuilder and the various Constants.h classes desperately needs to be reconciled, a point which I am sure everyone is painfully aware of.)</div>

<div><br></div><div>Another thing I'd like to see is for ConstantArray::get(), ConstantStruct::get() and ConstantVector::get() to have an overload that takes an iterator pair like IRBuilder's CreateGEP and CreateCall methods. Also useful for creating small structs would be overloads for ConstantStruct::get that took 1-4 arguments, instead of having to create a vector every time. Even better would be an "end with null" version, like StructType::get() does. These should be added to FunctionType::get() as well.</div>

<div><br></div></div><div>-- <br>-- Talin<br>
</div></div>