aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorCullen Rhodes <cullen.rhodes@arm.com>2020-05-28 09:00:51 +0000
committerCullen Rhodes <cullen.rhodes@arm.com>2020-05-28 09:36:24 +0000
commite533a176b3d4d936a4870cd1a3273941ba699882 (patch)
tree0176c804726cc74b1b64218b3187a762d3fff9fb /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent69935d86aed1b691c5f33a2141f15cb3aaee1af6 (diff)
downloadllvm-e533a176b3d4d936a4870cd1a3273941ba699882.zip
llvm-e533a176b3d4d936a4870cd1a3273941ba699882.tar.gz
llvm-e533a176b3d4d936a4870cd1a3273941ba699882.tar.bz2
[TableGen] Fix non-standard escape warnings for braces in InstAlias
Summary: TableGen interprets braces ('{}') in the asm string of instruction aliases as variants but when defining aliases with literal braces they have to be escaped to prevent them being removed. Braces are escaped with '\\', for example: def FooBraces : InstAlias<"foo \\{$imm\\}", (foo IntOperand:$imm)>; Although when TableGen is emitting the assembly writer (-gen-asm-writer) the AsmString that gets emitted is: AsmString = "foo \{$\x01\}"; In c/c++ braces don't need to be escaped which causes compilation warnings: warning: use of non-standard escape character '\{' [-Wpedantic] This patch fixes the issue by unescaping the flattened alias asm string in the asm writer, by replacing '\{\}' with '{}'. Reviewed By: hfinkel Differential Revision: https://reviews.llvm.org/D79991
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions