Eli Bendersky
2012-Dec-14 19:35 UTC
[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
On Tue, Dec 11, 2012 at 2:48 PM, Carter, Jack <jcarter at mips.com> wrote:> Attached are the promised patches for the below proposed change. >Just a quick question from an initial review: isn't the int->bool mapping of flags a bit limiting. Flag can have actual values and not only be there or not be there. Wouldn't a more generic mapping (string->string ?) be more universally useful? Or am I missing something obvious here... Eli
Carter, Jack
2012-Dec-14 21:03 UTC
[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
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? How about the rest of the patch? I appreciate the feedback, Jack ________________________________________ From: Eli Bendersky [eliben at google.com] Sent: Friday, December 14, 2012 11:35 AM To: Carter, Jack Cc: Jim Grosbach; List Subject: Re: [LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter On Tue, Dec 11, 2012 at 2:48 PM, Carter, Jack <jcarter at mips.com> wrote:> Attached are the promised patches for the below proposed change. >Just a quick question from an initial review: isn't the int->bool mapping of flags a bit limiting. Flag can have actual values and not only be there or not be there. Wouldn't a more generic mapping (string->string ?) be more universally useful? Or am I missing something obvious here... Eli
Eli Bendersky
2012-Dec-15 00:26 UTC
[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
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
Reasonably Related Threads
- [LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
- [LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
- [LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
- [LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
- [LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter