summaryrefslogtreecommitdiff
path: root/utils/TableGen/SequenceToOffsetTable.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-30 20:24:14 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-30 20:24:14 +0000
commit0d4e2ea00eac5d51a74a54dd504a8f34580041d7 (patch)
tree1343c87c313a4ebdbe8c4fef57e5c0340876115f /utils/TableGen/SequenceToOffsetTable.h
parent77ff8bbc2abf13b269bf1e66526e813955b078a7 (diff)
downloadllvm-0d4e2ea00eac5d51a74a54dd504a8f34580041d7.tar.gz
llvm-0d4e2ea00eac5d51a74a54dd504a8f34580041d7.tar.bz2
llvm-0d4e2ea00eac5d51a74a54dd504a8f34580041d7.tar.xz
Reapply 153764 and 153761 with a fix.
Use an explicit comparator instead of the default. The sets are sorted, but not using the default comparator. Hopefully, this will unbreak the Linux builders. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153772 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/SequenceToOffsetTable.h')
-rw-r--r--utils/TableGen/SequenceToOffsetTable.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/TableGen/SequenceToOffsetTable.h b/utils/TableGen/SequenceToOffsetTable.h
index 26e705841f..09dccbb108 100644
--- a/utils/TableGen/SequenceToOffsetTable.h
+++ b/utils/TableGen/SequenceToOffsetTable.h
@@ -103,7 +103,9 @@ public:
/// emit - Print out the table as the body of an array initializer.
/// Use the Print function to print elements.
- void emit(raw_ostream &OS, void (*Print)(raw_ostream&, ElemT)) const {
+ void emit(raw_ostream &OS,
+ void (*Print)(raw_ostream&, ElemT),
+ const char *Term = "0") const {
assert(Entries && "Call layout() before emit()");
for (typename SeqMap::const_iterator I = Seqs.begin(), E = Seqs.end();
I != E; ++I) {
@@ -113,7 +115,7 @@ public:
Print(OS, *SI);
OS << ", ";
}
- OS << "0,\n";
+ OS << Term << ",\n";
}
}
};