[PATCH] D79991: [TableGen] Fix non-standard escape warnings for braces in InstAlias
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 19 05:54:54 PDT 2020
hfinkel added inline comments.
================
Comment at: llvm/utils/TableGen/AsmWriterEmitter.cpp:808
CodeGenInstruction::FlattenAsmStringVariants(CGA.AsmString, Variant);
+ UnescapeString(FlatAliasAsmString);
----------------
c-rhodes wrote:
> hfinkel wrote:
> > Is this unescaping the right thing to do in general, or do we really just want to do it for the braces? What if there were an escaped quote in the string?
> We probably only want to do this for braces. I wasn't too sure about adding this `UnescapeString` incase we get any undesired behaviour but the tests didn't raise any issues. Maybe it would be better if I create a new function `UnescapeAliasString` to handle this particular case?
I recommend adding some test cases with some other escapes (quotes, new lines) and, if they don't work correctly, add a `UnescapeAliasString`. If everything does work correctly, then leave it as-is + the extra tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79991/new/
https://reviews.llvm.org/D79991
More information about the llvm-commits
mailing list