[llvm-commits] [PATCH] LTO code generator options

Rafael Espindola espindola at google.com
Thu Nov 12 10:59:08 PST 2009


> The updated patch is attached.
>
> * StringRef is passed by value;
> * Removed getArchNameForLLVMArchType;
> * Fixed strange alignment.
> * Removed all cosmetic changes from this patch.
>
> Is it Ok to submit?

Sorry about the delay. I am not very familiar with this code.

About Triple::getArchNameForDarwinArchTriplePart. Its output is passed
to the assembler, so the comment "gcc?" should probably be replaced
with "architecture name used by the assembler" or something like that.

Can you make it non static? So instead of

Triple::getArchNameForDarwinArchTriplePart(_targetTriple.getArchName()

we would have

_targetTriple.getArchNameForDarwinArchTriplePart()

If you move the check for "is darwin" into that method you could also
rename it into something like getAssemblerArchName. The code that uses
it would look like

const char *arch = _targetTriple.getAssemblerArchName();
if (arch != NULL) {
...
}

Just have the method return NULL  if it is not darwin.

Finally,  this part is an (very nice) independent cleanup, no? Would
you mind putting it in an independent patch?

> Cheers,
>Viktor

Thanks,
-- 
Rafael Ávila de Espíndola




More information about the llvm-commits mailing list