]> granicus.if.org Git - clang/commitdiff
Adding some FIXMEs to the attribute emitter code regarding whether pretty printing...
authorAaron Ballman <aaron@aaronballman.com>
Mon, 15 Sep 2014 16:16:14 +0000 (16:16 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 15 Sep 2014 16:16:14 +0000 (16:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217781 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/ClangAttrEmitter.cpp

index ce6f116af3b440a8b28252bdc213419933c5fda3..53a5758db76847039650bc27940b99b92c5df209 100644 (file)
@@ -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";
     }