diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/TableGen/Record.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp index 97e796c1349..6e982bf1da1 100644 --- a/llvm/lib/TableGen/Record.cpp +++ b/llvm/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 { |

