diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2019-05-29 03:28:51 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2019-05-29 03:28:51 +0000 |
commit | 10c548cdfa1ebe15c0312d373191b09fbe7b6a3c (patch) | |
tree | 4193aa327c9d8415cf0c9554fb8af6e840ffc496 /llvm/lib/IR/LLVMContextImpl.h | |
parent | 586831b2b098fe572b34f411ddaff3b21b053a4b (diff) | |
download | bcm5719-llvm-10c548cdfa1ebe15c0312d373191b09fbe7b6a3c.tar.gz bcm5719-llvm-10c548cdfa1ebe15c0312d373191b09fbe7b6a3c.zip |
IR: Give the TypeAllocator a more generic name and start using it for section names as well. NFCI.
This prepares us to start using it for partition names.
llvm-svn: 361922
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.h')
-rw-r--r-- | llvm/lib/IR/LLVMContextImpl.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h index aaa765be9fa..e977f051109 100644 --- a/llvm/lib/IR/LLVMContextImpl.h +++ b/llvm/lib/IR/LLVMContextImpl.h @@ -30,7 +30,6 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringSet.h" #include "llvm/BinaryFormat/Dwarf.h" #include "llvm/IR/Constants.h" #include "llvm/IR/DebugInfoMetadata.h" @@ -41,6 +40,7 @@ #include "llvm/IR/TrackingMDRef.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/Casting.h" +#include "llvm/Support/StringSaver.h" #include "llvm/Support/YAMLTraits.h" #include <algorithm> #include <cassert> @@ -1321,9 +1321,8 @@ public: Type X86_FP80Ty, FP128Ty, PPC_FP128Ty, X86_MMXTy; IntegerType Int1Ty, Int8Ty, Int16Ty, Int32Ty, Int64Ty, Int128Ty; - /// TypeAllocator - All dynamically allocated types are allocated from this. - /// They live forever until the context is torn down. - BumpPtrAllocator TypeAllocator; + BumpPtrAllocator Alloc; + UniqueStringSaver Saver{Alloc}; DenseMap<unsigned, IntegerType*> IntegerTypes; @@ -1357,9 +1356,6 @@ public: /// Collection of per-GlobalObject sections used in this context. DenseMap<const GlobalObject *, StringRef> GlobalObjectSections; - /// Stable collection of section strings. - StringSet<> SectionStrings; - /// DiscriminatorTable - This table maps file:line locations to an /// integer representing the next DWARF path discriminator to assign to /// instructions in different blocks at the same location. |