[PATCH] D74649: [TBLGEN] Emit register pressure set enum
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 16 03:38:43 PST 2020
nhaehnle added inline comments.
================
Comment at: llvm/utils/TableGen/RegisterInfoEmitter.cpp:101-109
+static std::string getLegalCName(std::string Name) {
+ static const char legal_elements[] =
+ "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+ std::string::size_type pos = 0;
+ while ((pos = Name.find_first_not_of(legal_elements, pos)) !=
+ std::string::npos)
+ Name.replace(pos, 1, "_");
----------------
Is there no pre-existing way of doing this in TableGen? If not, why is this needed in the first place?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74649/new/
https://reviews.llvm.org/D74649
More information about the llvm-commits
mailing list