[llvm-commits] CVS: llvm/include/llvm/CodeGen/AsmPrinter.h
Chris Lattner
lattner at cs.uiuc.edu
Thu Nov 10 10:06:09 PST 2005
Changes in directory llvm/include/llvm/CodeGen:
AsmPrinter.h updated: 1.13 -> 1.14
---
Log message:
add support for .asciz, and enable it by default. If your target assembler
doesn't support .asciz, just set AscizDirective to null in your asmprinter.
This compiles C strings to:
l1__2E_str_1: ; '.str_1'
.asciz "foo"
instead of:
l1__2E_str_1: ; '.str_1'
.ascii "foo\000"
---
Diffs of the changes: (+7 -1)
AsmPrinter.h | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletion(-)
Index: llvm/include/llvm/CodeGen/AsmPrinter.h
diff -u llvm/include/llvm/CodeGen/AsmPrinter.h:1.13 llvm/include/llvm/CodeGen/AsmPrinter.h:1.14
--- llvm/include/llvm/CodeGen/AsmPrinter.h:1.13 Thu Apr 21 15:38:00 2005
+++ llvm/include/llvm/CodeGen/AsmPrinter.h Thu Nov 10 12:05:57 2005
@@ -77,7 +77,12 @@
/// AsciiDirective - This directive allows emission of an ascii string with
/// the standard C escape characters embedded into it.
- const char *AsciiDirective;
+ const char *AsciiDirective; // Defaults to "\t.ascii\t"
+
+ /// AscizDirective - If not null, this allows for special handling of
+ /// zero terminated strings on this target. This is commonly supported as
+ /// ".asciz". If a target doesn't support this, it can be set to null.
+ const char *AscizDirective; // Defaults to "\t.asciz\t"
/// DataDirectives - These directives are used to output some unit of
/// integer data to the current section. If a data directive is set to
@@ -108,6 +113,7 @@
FunctionAddrSuffix(""),
ZeroDirective("\t.zero\t"),
AsciiDirective("\t.ascii\t"),
+ AscizDirective("\t.asciz\t"),
Data8bitsDirective("\t.byte\t"),
Data16bitsDirective("\t.short\t"),
Data32bitsDirective("\t.long\t"),
More information about the llvm-commits
mailing list