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/Globals.cpp | |
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/Globals.cpp')
-rw-r--r-- | llvm/lib/IR/Globals.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp index b2f5640026f..b3fdcc6a5fc 100644 --- a/llvm/lib/IR/Globals.cpp +++ b/llvm/lib/IR/Globals.cpp @@ -192,9 +192,8 @@ void GlobalObject::setSection(StringRef S) { // Get or create a stable section name string and put it in the table in the // context. - if (!S.empty()) { - S = getContext().pImpl->SectionStrings.insert(S).first->first(); - } + if (!S.empty()) + S = getContext().pImpl->Saver.save(S); getContext().pImpl->GlobalObjectSections[this] = S; // Update the HasSectionHashEntryBit. Setting the section to the empty string |