[PATCH] [IR/AsmWriter] Output escape sequences if the first character isdigit()
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Thu May 28 08:00:37 PDT 2015
================
Comment at: docs/LangRef.rst:840
@@ -837,1 +839,3 @@
+ identifiers, but quoted names are not allowed.
+
Syntax::
----------------
Maybe mention that you can still use escapes, so in the end we support any name but have a different syntax in the .ll
================
Comment at: lib/IR/AsmWriter.cpp:2218
@@ -2217,4 +2217,3 @@
-void AssemblyWriter::printNamedMDNode(const NamedMDNode *NMD) {
- Out << '!';
- StringRef Name = NMD->getName();
+static void PrintMetadataIdentifier(StringRef Name,
+ formatted_raw_ostream &Out) {
----------------
Start with a lowercase letter.
================
Comment at: lib/IR/AsmWriter.cpp:2223
@@ -2223,4 +2222,3 @@
} else {
- if (isalpha(static_cast<unsigned char>(Name[0])) ||
- Name[0] == '-' || Name[0] == '$' ||
- Name[0] == '.' || Name[0] == '_')
+ if (isalpha(static_cast<unsigned char>(Name[0])) || Name[0] == '-' ||
+ Name[0] == '$' || Name[0] == '.' || Name[0] == '_')
----------------
This is just clang-format, right? Please commit it first.
================
Comment at: lib/IR/LLVMContext.cpp:246
@@ -248,4 +245,3 @@
// If this is new, assign it its ID.
- return pImpl->CustomMDKindNames.insert(std::make_pair(
- Name,
- pImpl->CustomMDKindNames.size()))
+ return pImpl->CustomMDKindNames.insert(
+ std::make_pair(
----------------
Commit the clang-format bits first.
http://reviews.llvm.org/D10079
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list