[PATCH] D75111: [MC] Allowing the use of $-prefixed integer as asm identifiers
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 15:41:54 PST 2020
efriedma added inline comments.
================
Comment at: llvm/include/llvm/MC/MCAsmMacro.h:100
StringRef getIdentifier() const {
- if (Kind == Identifier)
+ if (Kind == Identifier || Kind == Integer)
return getString();
----------------
I'd prefer to write out the new logic at the location of the relevant caller, instead. (Anything can call getString().)
================
Comment at: llvm/lib/MC/MCParser/AsmParser.cpp:2858
- if (Buf[0].isNot(AsmToken::Identifier))
+ if (Buf[0].isNot(AsmToken::Identifier) && Buf[0].isNot(AsmToken::String)
+ && Buf[0].isNot(AsmToken::Integer))
----------------
String? I don't think we want to allow $"foo".
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75111/new/
https://reviews.llvm.org/D75111
More information about the llvm-commits
mailing list