diff options
author | Andrew Savonichev <andrew.savonichev@gmail.com> | 2022-04-11 21:33:04 +0300 |
---|---|---|
committer | Andrew Savonichev <andrew.savonichev@gmail.com> | 2022-04-17 18:02:33 +0300 |
commit | 52053aa94fe951ebf71ce3db01cf93ac9855ba8f (patch) | |
tree | 9f071aec6b7640116d8d738778ff2a5a499b2cda /clang/lib/Basic/Builtins.cpp | |
parent | daabcf5f04bbd13ac53f76ca3cc43b0d1ef64f5a (diff) | |
download | llvm-52053aa94fe951ebf71ce3db01cf93ac9855ba8f.zip llvm-52053aa94fe951ebf71ce3db01cf93ac9855ba8f.tar.gz llvm-52053aa94fe951ebf71ce3db01cf93ac9855ba8f.tar.bz2 |
[NVPTX] Disable parens for identifiers starting with '$'
ptxas fails to parse such syntax:
mov.u64 %rd1, ($str);
fatal : Parsing error near '$str': syntax error
A new MCAsmInfo option was added because InParens parameter of
MCExpr::print is not sufficient to disable parens
completely. MCExpr::print resets it to false for a recursive call in
case of unary or binary expressions.
Targets that require parens around identifiers that start with '$'
should always pass MCAsmInfo to MCExpr::print.
Therefore 'operator<<(raw_ostream &, MCExpr&)' should be avoided
because it calls MCExpr::print with nullptr MAI.
Differential Revision: https://reviews.llvm.org/D123702
Diffstat (limited to 'clang/lib/Basic/Builtins.cpp')
0 files changed, 0 insertions, 0 deletions