summaryrefslogtreecommitdiff
path: root/lib/TableGen/Record.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-07-05 14:21:36 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-07-05 14:21:36 +0000
commit1a82d4c088707c791c792f6822f611b47a12bdfe (patch)
tree7c411f9b5d807f7f204fdd16965d8925a82b6d18 /lib/TableGen/Record.cpp
parent3a0822f094b578157263e04114075ad7df81db41 (diff)
Notes
Diffstat (limited to 'lib/TableGen/Record.cpp')
-rw-r--r--lib/TableGen/Record.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp
index 97e796c1349a..6e982bf1da19 100644
--- a/lib/TableGen/Record.cpp
+++ b/lib/TableGen/Record.cpp
@@ -1574,13 +1574,9 @@ void Record::checkName() {
}
DefInit *Record::getDefInit() {
- static DenseMap<Record *, std::unique_ptr<DefInit>> ThePool;
- if (TheInit)
- return TheInit;
-
- std::unique_ptr<DefInit> &I = ThePool[this];
- if (!I) I.reset(new DefInit(this, new RecordRecTy(this)));
- return I.get();
+ if (!TheInit)
+ TheInit.reset(new DefInit(this, new RecordRecTy(this)));
+ return TheInit.get();
}
const std::string &Record::getName() const {