From 10c548cdfa1ebe15c0312d373191b09fbe7b6a3c Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 29 May 2019 03:28:51 +0000 Subject: 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 --- llvm/lib/IR/LLVMContextImpl.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'llvm/lib/IR/LLVMContextImpl.h') 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 #include @@ -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 IntegerTypes; @@ -1357,9 +1356,6 @@ public: /// Collection of per-GlobalObject sections used in this context. DenseMap 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. -- cgit v1.2.3