diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-21 20:37:19 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-21 20:37:19 +0000 |
commit | bf48a9b6db111fc14a8faef1adefbce5d807aaef (patch) | |
tree | 1dd8371e8fa93db5d125acee5b8cef59b1118c70 /lib/VMCore/LLVMContextImpl.h | |
parent | f65b0e9b455da8ab2936c9a6d4ead5c92716e13a (diff) |
Memoize InlineAsms into the LLVMContext and delete them on shutdown.
Fixes PR803.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99143 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/LLVMContextImpl.h')
-rw-r--r-- | lib/VMCore/LLVMContextImpl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h index 9978f40ed0..8d5a924ca2 100644 --- a/lib/VMCore/LLVMContextImpl.h +++ b/lib/VMCore/LLVMContextImpl.h @@ -135,6 +135,8 @@ public: DenseMap<std::pair<Function*, BasicBlock*> , BlockAddress*> BlockAddresses; ConstantUniqueMap<ExprMapKeyType, Type, ConstantExpr> ExprConstants; + + ConstantUniqueMap<InlineAsmKeyType, PointerType, InlineAsm> InlineAsms; ConstantInt *TheTrueVal; ConstantInt *TheFalseVal; @@ -224,6 +226,7 @@ public: AggZeroConstants.freeConstants(); NullPtrConstants.freeConstants(); UndefValueConstants.freeConstants(); + InlineAsms.freeConstants(); for (IntMapTy::iterator I = IntConstants.begin(), E = IntConstants.end(); I != E; ++I) { if (I->second->use_empty()) |