summaryrefslogtreecommitdiff
path: root/include/llvm/TableGen
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-01-10 18:50:05 +0000
committerJordan Rose <jordan_rose@apple.com>2013-01-10 18:50:05 +0000
commitd122009e57217bd574703c46dd14b1a9235ed0b7 (patch)
tree9444e1e9d31d6602a321b36cf56da5936eb24b04 /include/llvm/TableGen
parent4aebce83212d7271454c8767085645fe11054b44 (diff)
downloadllvm-d122009e57217bd574703c46dd14b1a9235ed0b7.tar.gz
llvm-d122009e57217bd574703c46dd14b1a9235ed0b7.tar.bz2
llvm-d122009e57217bd574703c46dd14b1a9235ed0b7.tar.xz
TableGen: record anonymous instantiations of classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/TableGen')
-rw-r--r--include/llvm/TableGen/Record.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h
index 8968534aba..61f868c7d5 100644
--- a/include/llvm/TableGen/Record.h
+++ b/include/llvm/TableGen/Record.h
@@ -1393,6 +1393,7 @@ class Record {
RecordKeeper &TrackedRecords;
DefInit *TheInit;
+ bool IsAnonymous;
void init();
void checkName();
@@ -1401,14 +1402,15 @@ public:
// Constructs a record.
explicit Record(const std::string &N, ArrayRef<SMLoc> locs,
- RecordKeeper &records) :
+ RecordKeeper &records, bool Anonymous = false) :
ID(LastID++), Name(StringInit::get(N)), Locs(locs.begin(), locs.end()),
- TrackedRecords(records), TheInit(0) {
+ TrackedRecords(records), TheInit(0), IsAnonymous(Anonymous) {
init();
}
- explicit Record(Init *N, ArrayRef<SMLoc> locs, RecordKeeper &records) :
+ explicit Record(Init *N, ArrayRef<SMLoc> locs, RecordKeeper &records,
+ bool Anonymous = false) :
ID(LastID++), Name(N), Locs(locs.begin(), locs.end()),
- TrackedRecords(records), TheInit(0) {
+ TrackedRecords(records), TheInit(0), IsAnonymous(Anonymous) {
init();
}
@@ -1417,7 +1419,8 @@ public:
Record(const Record &O) :
ID(LastID++), Name(O.Name), Locs(O.Locs), TemplateArgs(O.TemplateArgs),
Values(O.Values), SuperClasses(O.SuperClasses),
- TrackedRecords(O.TrackedRecords), TheInit(O.TheInit) { }
+ TrackedRecords(O.TrackedRecords), TheInit(O.TheInit),
+ IsAnonymous(O.IsAnonymous) { }
~Record() {}
@@ -1541,6 +1544,10 @@ public:
return TrackedRecords;
}
+ bool isAnonymous() const {
+ return IsAnonymous;
+ }
+
void dump() const;
//===--------------------------------------------------------------------===//