summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDeLesley Hutchins <delesley@google.com>2012-01-20 22:50:54 +0000
committerDeLesley Hutchins <delesley@google.com>2012-01-20 22:50:54 +0000
commit23323e0253716ff03c95a00fb6903019daafe3aa (patch)
tree765f6ebb8f08a68f2881021e582472a27fcb1d24 /utils
parent7b9ff0c09025dcbe48ec7db71330e2066d1e1863 (diff)
Delayed template instantiation of late-parsed attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/ClangAttrEmitter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp
index dd3de66fbd..7db1ababb1 100644
--- a/utils/TableGen/ClangAttrEmitter.cpp
+++ b/utils/TableGen/ClangAttrEmitter.cpp
@@ -349,7 +349,7 @@ namespace {
<< "Size;\n";
OS << " }\n";
OS << " unsigned " << getLowerName() << "_size() const {\n"
- << " return " << getLowerName() << "Size;\n;";
+ << " return " << getLowerName() << "Size;\n";
OS << " }";
}
void writeCloneArgs(raw_ostream &OS) const {
@@ -709,6 +709,11 @@ void ClangAttrClassEmitter::run(raw_ostream &OS) {
<< "attr::" << R.getName() << "; }\n";
OS << " static bool classof(const " << R.getName()
<< "Attr *) { return true; }\n";
+
+ bool LateParsed = R.getValueAsBit("LateParsed");
+ OS << " virtual bool isLateParsed() const { return "
+ << LateParsed << "; }\n";
+
OS << "};\n\n";
}