diff options
Diffstat (limited to 'lib/TableGen')
-rw-r--r-- | lib/TableGen/Record.cpp | 10 | ||||
-rw-r--r-- | lib/TableGen/TGLexer.h | 2 |
2 files changed, 4 insertions, 8 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 { diff --git a/lib/TableGen/TGLexer.h b/lib/TableGen/TGLexer.h index d97d1caf6b88..cbc30be8a572 100644 --- a/lib/TableGen/TGLexer.h +++ b/lib/TableGen/TGLexer.h @@ -60,7 +60,7 @@ namespace tgtok { // String valued tokens. Id, StrVal, VarName, CodeFragment }; -} // namespace tgtok +} /// TGLexer - TableGen Lexer class. class TGLexer { |