diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-09-15 16:16:14 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-09-15 16:16:14 +0000 |
commit | 36d791023e124f9b2d06224be0d5c2a5ca8e5055 (patch) | |
tree | 671c335f710b73c189c4b54ef62094fa4606dc6e | |
parent | 7339c03489afac3b3a90ef28dd52e9ac04706e9e (diff) | |
download | bcm5719-llvm-36d791023e124f9b2d06224be0d5c2a5ca8e5055.tar.gz bcm5719-llvm-36d791023e124f9b2d06224be0d5c2a5ca8e5055.zip |
Adding some FIXMEs to the attribute emitter code regarding whether pretty printing enumerators should use quoted string literals, or identifiers. NFC.
llvm-svn: 217781
-rw-r--r-- | clang/utils/TableGen/ClangAttrEmitter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp index ce6f116af3b..53a5758db76 100644 --- a/clang/utils/TableGen/ClangAttrEmitter.cpp +++ b/clang/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"; } |