<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The possible ambiguity between the "regular" calls and the range call is a good reason, though I don't really think suffixing function names with the number of arguments it takes can make anything more obvious. Besides, if it's forgotten, you get something like <font class="Apple-style-span" face="Menlo"><i>Invalid conversion from 'unsigned int' to 'llvm::Value*' initializing argument 3 of 'void llvm::CallInst::init(llvm::Value*, llvm::Value*, llvm::Value*)</i></font><i>'</i>, which isn't very helpful. (I'm running llvm-gcc-4.2, I'm waiting for Xcode 4 to bring clang++ to my computer.)<div><div><div><br></div><div>Félix</div><div><div><br><div><div>Le 2010-06-26 à 00:00:50, Chris Lattner a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Jun 25, 2010, at 6:24 PM, Félix Cloutier wrote:<br><br><blockquote type="cite">Hey guys,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Whys are there like 5 variants of CreateCall in IRBuilder<> with numbers appended to them? The only difference I can see is the number of arguments. Aren't C++ function overloads be suited for this?<br></blockquote><br>An overload could work, but this sort of API makes it more obvious which one you're trying to call and avoids overload ambiguity errors for the range case.<br><br>-Chris</div></blockquote></div></div></div></div><div><div><br></div></div></div></body></html>