[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter

Eli Bendersky eliben at google.com
Fri Dec 14 16:26:20 PST 2012


On Fri, Dec 14, 2012 at 1:03 PM, Carter, Jack <jcarter at mips.com> wrote:
> Eli,
>
> This is the kind of feedback I want. I believe I have to add to the base class so it should be generally useful. I can see string being better for the value. I still am enamoured with an enumeration for the tab though: int->string. How would that be a limitation?
>

I guess that's fine, as long as you don't just limit it to binary "has
/ hasn't flag".

> How about the rest of the patch?
>

There's one thing about it I'm not sure I understand. You are
essentially passing commands to the assembler via "target"
information. But how does this make sense? I realize that the flags
themselves (their kinds and possible values) are properties of the
target, but their passing to the assembler is not. In other words, I
would expect the assembler driver to propagate flags down to the ELF
writer in some manner which is not through the target object. The
target object is supposed to provide information about the target,
which does not depend on the particular invocation of the assembler
and the flags passed to it.

I hope the above is coherent; it not, feel free to demand another attempt.

Eli




More information about the llvm-dev mailing list