[LLVMdev] Print Global Prefix Issue

Jan Tlatlik jtlatlik at techfak.uni-bielefeld.de
Fri Mar 29 08:16:13 PDT 2013


Hey,

I have an odd problem with printing prefixed global symbols in my
AsmPrinter.

In my MCAsmInfo subclass implementation, I set

    GlobalPrefix = "%";


because my assembler needs this to avoid name collisions.
Now, whenever a global symbol (be it a label, mbb operand ,etc.) gets
printed, it is encapsulated in quotes.
With other chars than '%' everything is okay...

I also explicitly set AllowQuotesInName = false (which should be the
default).

Here is a shortened output example:

        .file    "main.c"
        .text
        .global    "%main"
        .align    4
        .type    "%main", at function
    "%main":
        [...]
    .Ltmp0:
        .size    "%main", .Ltmp0-"%main"


Is this working as intended? Because I really need to use the percent as
prefix and can't have the quotes in the symbol name.

Greetings, Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130329/dca59497/attachment.html>


More information about the llvm-dev mailing list