[llvm-commits] Patch to unify same code in multiple spots

Duncan Sands baldrick at free.fr
Fri Jul 20 00:19:58 PDT 2012


Hi Micah,

> In the AsmWriter.cpp, there are multiple spots where the same information is
> printed out(except for a single space).
>
> This patch unifies these locations into a helper function making adding new
> calling conventions less error prone as only a single location needs to be modified.

how about having the factorized function return the calling convention name as a
const char *, since that's more general, and then do
   Out << getCallingConvName(F->getCallingConv());
etc.

Ciao, Duncan.



More information about the llvm-commits mailing list