[llvm] r194575 - Remove AllowQuotesInName and friends from MCAsmInfo.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Mar 7 14:08:44 PST 2014

> Hi Rafael,
> Sorry to get back to this months after the commit, but I just ran into
> problems with this. It appears to be a regression for NVPTX, which emits
> assembly for the consumption of a non-standard assembler (ptxas, not gas or
> llvm gas-like assemblers). Without this provision in place, LLVM emits
> symbol names with periods, which ptxas chokes on.
> Can you elaborate on the technical reason for this change a bit more? Should
> LLVM only care about gas and llvm-mc as assemblers? What about backends that
> have custom assemblers? How would you suggest to work around this issue if
> reviving the AllowPeriodsInName flag is a no-go?

So, what was going on in llvm was a confusion about what an object
format can support and what an assembler can support. There is nothing
wrong with a symbol named, for example, $.$, but some assembler will
need some help with quoting to produce a symbol with that name. Given
a global value named $.$, llvm should do its best to produce a symbol
with that name and fail with an error if there is no amount of quoting
and escaping that would make a given assembler happy.

The old behavior of producing a symbol with a different name was
really just a bug.

Giving that the code in question was working with the renaming in
place, maybe it can just be changed to use a name the assembler is OK


More information about the llvm-commits mailing list