summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Globals.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2019-05-29 03:28:51 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2019-05-29 03:28:51 +0000
commit10c548cdfa1ebe15c0312d373191b09fbe7b6a3c (patch)
tree4193aa327c9d8415cf0c9554fb8af6e840ffc496 /llvm/lib/IR/Globals.cpp
parent586831b2b098fe572b34f411ddaff3b21b053a4b (diff)
downloadbcm5719-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.cpp5
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
OpenPOWER on IntegriCloud