From: Aaron Ballman Date: Mon, 15 Sep 2014 16:16:14 +0000 (+0000) Subject: Adding some FIXMEs to the attribute emitter code regarding whether pretty printing... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6eb5757e251eb9fc4a6cf0c5762867b6493f53f8;p=clang Adding some FIXMEs to the attribute emitter code regarding whether pretty printing enumerators should use quoted string literals, or identifiers. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217781 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp index ce6f116af3..53a5758db7 100644 --- a/utils/TableGen/ClangAttrEmitter.cpp +++ b/utils/TableGen/ClangAttrEmitter.cpp @@ -684,6 +684,9 @@ namespace { OS << "Record.push_back(SA->get" << getUpperName() << "());\n"; } void writeValue(raw_ostream &OS) const override { + // FIXME: this isn't 100% correct -- some enum arguments require printing + // as a string literal, while others require printing as an identifier. + // Tablegen currently does not distinguish between the two forms. OS << "\\\"\" << " << getAttrName() << "Attr::Convert" << type << "ToStr(get" << getUpperName() << "()) << \"\\\""; } @@ -737,6 +740,9 @@ namespace { protected: void writeValueImpl(raw_ostream &OS) const override { + // FIXME: this isn't 100% correct -- some enum arguments require printing + // as a string literal, while others require printing as an identifier. + // Tablegen currently does not distinguish between the two forms. OS << " OS << \"\\\"\" << " << getAttrName() << "Attr::Convert" << type << "ToStr(Val)" << "<< \"\\\"\";\n"; }