From 6eb5757e251eb9fc4a6cf0c5762867b6493f53f8 Mon Sep 17 00:00:00 2001
From: Aaron Ballman <aaron@aaronballman.com>
Date: Mon, 15 Sep 2014 16:16:14 +0000
Subject: [PATCH] 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
---
 utils/TableGen/ClangAttrEmitter.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp
index ce6f116af3b..53a5758db76 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";
     }
-- 
GitLab