diff options
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 |