currently, there is no (easy) way to set the AssemblerDialect. the
only method i am aware of is to set that via cl:opt.
this patch fixes that by adding a public function
setAssemblerDialect() to class MCAsmInfo.
Signed-off-by: Jun Koi <junkoi2004 at gmail.com>
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h
index 97aad71..cd08a7e 100644
--- a/include/llvm/MC/MCAsmInfo.h
+++ b/include/llvm/MC/MCAsmInfo.h
@@ -453,6 +453,9 @@ namespace llvm {
unsigned getAssemblerDialect() const {
return AssemblerDialect;
}
+ void setAssemblerDialect(unsigned dialect) {
+ AssemblerDialect = dialect;
+ }
bool doesAllowQuotesInName() const {
return AllowQuotesInName;
}
What's the use case? On Oct 1, 2012, at 8:33 PM, Jun Koi <junkoi2004 at gmail.com> wrote:> currently, there is no (easy) way to set the AssemblerDialect. the > only method i am aware of is to set that via cl:opt. > > this patch fixes that by adding a public function > setAssemblerDialect() to class MCAsmInfo. > > Signed-off-by: Jun Koi <junkoi2004 at gmail.com> > > > diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h > index 97aad71..cd08a7e 100644 > --- a/include/llvm/MC/MCAsmInfo.h > +++ b/include/llvm/MC/MCAsmInfo.h > @@ -453,6 +453,9 @@ namespace llvm { > unsigned getAssemblerDialect() const { > return AssemblerDialect; > } > + void setAssemblerDialect(unsigned dialect) { > + AssemblerDialect = dialect; > + } > bool doesAllowQuotesInName() const { > return AllowQuotesInName; > } > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Wed, Oct 3, 2012 at 1:19 AM, Jim Grosbach <grosbach at apple.com> wrote:> What's the use case?the use case is that we can print out the assembly using alternative dialect. currently, on Intel machine, the default dialect is AT&T, and we cannot change that to Intel syntax without using cl:opt. the new public method lets us change the dialect without having cl:opt involved. thanks, Jun> On Oct 1, 2012, at 8:33 PM, Jun Koi <junkoi2004 at gmail.com> wrote: > >> currently, there is no (easy) way to set the AssemblerDialect. the >> only method i am aware of is to set that via cl:opt. >> >> this patch fixes that by adding a public function >> setAssemblerDialect() to class MCAsmInfo. >> >> Signed-off-by: Jun Koi <junkoi2004 at gmail.com> >> >> >> diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h >> index 97aad71..cd08a7e 100644 >> --- a/include/llvm/MC/MCAsmInfo.h >> +++ b/include/llvm/MC/MCAsmInfo.h >> @@ -453,6 +453,9 @@ namespace llvm { >> unsigned getAssemblerDialect() const { >> return AssemblerDialect; >> } >> + void setAssemblerDialect(unsigned dialect) { >> + AssemblerDialect = dialect; >> + } >> bool doesAllowQuotesInName() const { >> return AllowQuotesInName; >> } >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Reasonably Related Threads
- [LLVMdev] [patch] set AssemblerDialect
- [LLVMdev] [patch] set AssemblerDialect
- [LLVMdev] Where does LLVM mangle characters from llvm-ir names while generating native code?
- [LLVMdev] Where does LLVM mangle characters from llvm-ir names while generating native code?
- [LLVMdev] [PATCH] Output UTF-8-encoded characters as identifier characters into assembly by default.